x

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: Apache-2.0, BSD-3-Clause Imports: 2 Imported by: 0

README

Experimental Features

The Logs SDK contains features that have not yet stabilized in the OpenTelemetry specification. These features are added to the OpenTelemetry Go Logs SDK prior to stabilization in the specification so that users can start experimenting with them and provide feedback.

These feature may change in backwards incompatible ways as feedback is applied. See the Compatibility and Stability section for more information.

Features

Observability

The Logs SDK can be configured to provide observability about itself using OpenTelemetry metrics.

To opt-in, set the environment variable OTEL_GO_X_OBSERVABILITY to true.

When enabled, the SDK will create the following metrics using the global MeterProvider:

  • otel.sdk.log.created
  • otel.sdk.processor.log.queue.capacity
  • otel.sdk.processor.log.queue.size
  • otel.sdk.processor.log.processed

Please see the Semantic conventions for OpenTelemetry SDK metrics documentation for more details on these metrics.

Compatibility and Stability

Experimental features do not fall within the scope of the OpenTelemetry Go versioning and stability policy. These features may be removed or modified in successive version releases, including patch versions.

When an experimental feature is promoted to a stable feature, a migration path will be included in the changelog entry of the release. There is no guarantee that any environment variable feature flags that enabled the experimental feature will be supported by the stable version. If they are supported, they may be accompanied with a deprecation notice stating a timeline for the removal of that support.

Documentation

Overview

Package x documents experimental features for go.opentelemetry.io/otel/sdk/log.

Package x documents experimental features for go.opentelemetry.io/otel/sdk/log.

Index

Constants

This section is empty.

Variables

View Source
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).

Functions

This section is empty.

Types

type Feature added in v0.14.0

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 added in v0.14.0

func (f Feature[T]) Enabled() bool

Enabled reports whether the feature is enabled.

func (Feature[T]) Keys added in v0.15.0

func (f Feature[T]) Keys() []string

Keys returns the environment variable keys that can be set to enable the feature.

func (Feature[T]) Lookup added in v0.14.0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL