x
v1.47.0
go.opentelemetry.io/otel/sdk/metric/internal/x
Documentation
pkg.go.dev ↗Package x documents experimental features for go.opentelemetry.io/otel/sdk/metric.
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.