Cargo Features

opentelemetry_sdk = { version = "0.22.1", default-features = false, features = ["trace", "jaeger_remote_sampler", "logs", "logs_level_enabled", "metrics", "rt-tokio", "rt-tokio-current-thread", "rt-async-std", "testing"] }
default = trace

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

trace default jaeger_remote_sampler? testing? = async-trait, crossbeam-channel, percent-encoding, rand

Enables trace of opentelemetry

Affects export::trace, opentelemetry_sdk::propagation, opentelemetry_sdk::trace, testing::trace

jaeger_remote_sampler = http, opentelemetry-http, serde, serde_json, trace, url
logs logs_level_enabled? testing? = async-trait, crossbeam-channel, serde_json

Enables logs of opentelemetry

Affects export::logs, opentelemetry_sdk::logs, testing::logs

logs_level_enabled = logs

Enables logs_level_enabled of opentelemetry

Affects logs::LogExporter.event_enabled, log_processor::LogProcessor.event_enabled

metrics testing? = async-trait, glob

Enables metrics of opentelemetry

Affects opentelemetry_sdk::metrics, testing::metrics

rt-tokio testing? = tokio, tokio-stream

Affects runtime::Tokio, util::tokio_interval_stream

rt-tokio-current-thread testing? = tokio, tokio-stream

Affects runtime::TokioCurrentThread, util::tokio_interval_stream

rt-async-std testing? = async-std

Affects runtime::AsyncStd

testing = logs, metrics, rt-async-std, rt-tokio, rt-tokio-current-thread, trace

Enables testing of opentelemetry, macros and rt-multi-thread of tokio

Affects testing::trace, testing::metrics, testing::logs

Features from optional dependencies

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

opentelemetry-http jaeger_remote_sampler?
async-std rt-async-std?
async-trait logs? metrics? trace
crossbeam-channel logs? trace
percent-encoding trace
rand trace
glob metrics?
serde jaeger_remote_sampler?
serde_json jaeger_remote_sampler? logs?
url jaeger_remote_sampler?
tokio rt-tokio? rt-tokio-current-thread? testing?
tokio-stream rt-tokio? rt-tokio-current-thread?
http jaeger_remote_sampler?

Enables http ^0.2