Cargo Features

[dependencies]
opentelemetry = { version = "0.26.0", default-features = false, features = ["trace", "metrics", "logs", "logs_level_enabled", "otel_unstable", "testing"] }
default = logs, metrics, trace

These default features are set whenever opentelemetry is added without default-features = false somewhere in the dependency tree.

trace default testing? = pin-project-lite

Affects opentelemetry::trace, testing::trace, opentelemetry::time

metrics default testing?

Affects opentelemetry::metrics, opentelemetry::time

logs default logs_level_enabled?

Affects opentelemetry::logs

logs_level_enabled = logs

Affects logger::Logger.event_enabled

otel_unstable
testing = metrics, trace

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

pin-project-lite trace