x
v1.47.0
Documentation
pkg.go.dev ↗Package x documents experimental features for go.opentelemetry.io/otel/sdk/log.
Package x documents experimental features for go.opentelemetry.io/otel/sdk/log.
Variables
Observability
var Observability = newFeature(
[]string{"OBSERVABILITY", "SELF_OBSERVABILITY"},
func(v string) (string, bool) {
if strings.EqualFold(v, "true") {
return v, true
}
return "", false
},
)
Observability is an experimental feature flag that determines whether SDK observability metrics are enabled.
To enable this feature, set the OTEL_GO_X_OBSERVABILITY environment variable to the case-insensitive string value of "true" (i.e., "True" and "TRUE" will also enable this).
Types
Feature
type Feature[T any] struct {
// contains filtered or unexported fields
}
Feature is an experimental feature control flag. It provides a uniform way to interact with these feature flags and parse their values.
Feature[T].Enabled
func (f Feature[T]) Enabled() bool
Enabled reports whether the feature is enabled.
Feature[T].Keys
func (f Feature[T]) Keys() []string
Keys returns the environment variable keys that can be set to enable the feature.
Feature[T].Lookup
func (f Feature[T]) Lookup() (v T, ok bool)
Lookup returns the user-configured value for the feature and true if the user has enabled the feature. Otherwise, if the feature is not enabled, a zero value and false are returned.