Cargo Features

[dependencies]
opentelemetry = { version = "0.27.1", default-features = false, features = ["trace", "metrics", "logs", "spec_unstable_logs_enabled", "otel_unstable", "testing", "internal-logs"] }
default = internal-logs, logs, metrics, trace

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

trace default testing? = futures-core, futures-sink, pin-project-lite, thiserror

Affects opentelemetry::trace, record::LogRecord.set_trace_context, testing::trace, opentelemetry::time

metrics default testing?

Affects opentelemetry::metrics, opentelemetry::time

logs default spec_unstable_logs_enabled?

Affects opentelemetry::logs

spec_unstable_logs_enabled = logs

Affects logger::Logger.event_enabled

otel_unstable
testing = metrics, trace
internal-logs default = tracing

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.

futures-core trace
futures-sink trace
pin-project-lite trace
thiserror trace

Enables thiserror ^1

tracing internal-logs

Enables tracing

optional for opentelemetry internal logging