Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

x

v1.47.0
go.opentelemetry.io/otel/sdk/log/internal/x

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

7 matches

Top ↑

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.

Dependency graph