Debian Codegraph @

exporters/stdout/stdoutmetric/internal/x/features.go

raw
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 package x // import "go.opentelemetry.io/otel/exporters/stdout/stdoutmetric/internal/x"
5
6 import "strings"
7
8 // Observability is an experimental feature flag that determines if SDK
9 // observability metrics are enabled.
10 //
11 // To enable this feature set the OTEL_GO_X_OBSERVABILITY environment variable
12 // to the case-insensitive string value of "true" (i.e. "True" and "TRUE"
13 // will also enable this).
14 var Observability = newFeature(
15 []string{"OBSERVABILITY"},
16 func(v string) (string, bool) {
17 if strings.EqualFold(v, "true") {
18 return v, true
19 }
20 return "", false
21 },
22 )