Cargo Features

[dependencies]
opentelemetry_sdk = { version = "0.27.0", default-features = false, features = ["trace", "jaeger_remote_sampler", "logs", "spec_unstable_logs_enabled", "metrics", "rt-tokio", "rt-tokio-current-thread", "rt-async-std", "experimental_metrics_periodic_reader_no_runtime", "spec_unstable_metrics_views", "testing", "internal-logs"] }
default = internal-logs, logs, metrics, trace

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

trace default jaeger_remote_sampler? testing? = async-trait, 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 default spec_unstable_logs_enabled? testing? = async-trait, serde_json

Enables logs of opentelemetry

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

spec_unstable_logs_enabled = logs

Enables spec_unstable_logs_enabled of opentelemetry

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

metrics default experimental…reader_no_runtime? spec_unstable_metrics_views? 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

experimental_metrics_periodic_reader_no_runtime = metrics
spec_unstable_metrics_views = metrics

Affects view::new_view

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

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.

opentelemetry-http jaeger_remote_sampler?
async-std rt-async-std?
async-trait logs metrics 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?
tracing internal-logs