metricutil: remove BUILDX_EXPERIMENTAL from internal docker reporting

The `BUILDX_EXPERIMENTAL` check is removed from the docker otel
collector. We'll send metrics to the OTLP endpoint for docker desktop if
it is present and enabled regardless of experimental status.

The user-facing `OTEL` endpoints for enabling the metric reporting for
external use is still hidden behind the experimental flag. We'll likely
remove the experimental flag for this feature for v0.14.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
Jonathan A. Sternberg 2024-02-15 14:16:22 -06:00
parent c9d1c41d20
commit fe08cf2981
No known key found for this signature in database
GPG Key ID: 6603D4B96394F6B1
1 changed files with 7 additions and 7 deletions

View File

@ -37,14 +37,14 @@ type MeterProvider struct {
func NewMeterProvider(ctx context.Context, cli command.Cli) (*MeterProvider, error) {
var exps []sdkmetric.Exporter
// Only metric exporters if the experimental flag is set.
if confutil.IsExperimental() {
if exp, err := dockerOtelExporter(cli); err != nil {
return nil, err
} else if exp != nil {
exps = append(exps, exp)
}
if exp, err := dockerOtelExporter(cli); err != nil {
return nil, err
} else if exp != nil {
exps = append(exps, exp)
}
if confutil.IsExperimental() {
// Expose the user-facing metric exporter only if the experimental flag is set.
if exp, err := detectOtlpExporter(ctx); err != nil {
return nil, err
} else if exp != nil {