package x
import "go.opentelemetry.io/otel/sdk/internal/x"
Package x documents experimental features for go.opentelemetry.io/otel/sdk.
Package x documents experimental features for go.opentelemetry.io/otel/sdk.
Index ¶
Variables ¶
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 if 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).
var PerSeriesStartTimestamps = newFeature( []string{"PER_SERIES_START_TIMESTAMPS"}, func(v string) (bool, bool) { if strings.EqualFold(v, "true") { return true, true } return false, false }, )
PerSeriesStartTimestamps is an experimental feature flag that determines if the SDK uses the new Start Timestamps specification.
To enable this feature set the OTEL_GO_X_PER_SERIES_START_TIMESTAMPS environment variable to the case-insensitive string value of "true".
var Resource = newFeature( []string{"RESOURCE"}, func(v string) (string, bool) { if strings.EqualFold(v, "true") { return v, true } return "", false }, )
Resource is an experimental feature flag that defines if resource detectors should be included experimental semantic conventions.
To enable this feature set the OTEL_GO_X_RESOURCE environment variable to the case-insensitive string value of "true" (i.e. "True" and "TRUE" will also enable this).
Types ¶
type 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.
func (Feature[T]) Enabled ¶
Enabled reports whether the feature is enabled.
func (Feature[T]) Keys ¶
Keys returns the environment variable keys that can be set to enable the feature.
func (Feature[T]) Lookup ¶
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.
Source Files ¶
features.go x.go
- Version
- v1.43.0 (latest)
- Published
- Apr 3, 2026
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 1 hour ago –
Tools for package owners.