Cargo Features

opentelemetry_api = { version = "0.20.0", default-features = false, features = ["trace", "metrics", "logs", "logs_level_enabled", "testing"] }
default = trace

The trace feature is set by default whenever opentelemetry_api is added without default-features = false somewhere in the dependency tree.

trace default testing? = pin-project-lite

Affects opentelemetry_api::trace, opentelemetry_api::time


Affects opentelemetry_api::metrics, opentelemetry_api::time

logs logs_level_enabled?

Affects opentelemetry_api::logs

logs_level_enabled = logs

Affects logger::Logger.event_enabled

testing = trace

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

pin-project-lite trace