package x
import "go.opentelemetry.io/otel/sdk/trace/internal/x"
Package x documents experimental features for go.opentelemetry.io/otel/sdk/trace.
Index ¶
Variables ¶
var SelfObservability = newFeature("SELF_OBSERVABILITY", func(v string) (string, bool) { if strings.EqualFold(v, "true") { return v, true } return "", false })
SelfObservability is an experimental feature flag that determines if SDK self-observability metrics are enabled.
To enable this feature set the OTEL_GO_X_SELF_OBSERVABILITY 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]) Key ¶
Key returns the environment variable key that needs to 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 ¶
x.go
- Version
- v1.38.0
- Published
- Aug 29, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 3 hours ago –
Tools for package owners.