Cargo Features

[dependencies]
opentelemetry-otlp = { version = "0.27.0", default-features = false, features = ["trace", "metrics", "logs", "populate-logs-event-name", "internal-logs", "serialize", "grpc-tonic", "gzip-tonic", "zstd-tonic", "tls", "tls-roots", "tls-webpki-roots", "http-proto", "http-json", "reqwest-blocking-client", "reqwest-client", "reqwest-rustls", "reqwest-rustls-webpki-roots", "hyper-client", "integration-testing"] }
trace default http-json? http-proto? integration-testing?

telemetry pillars and functions

Enables trace of opentelemetry, opentelemetry-proto, and opentelemetry_sdk

opentelemetry_sdk:

need tokio runtime to run smoke tests.

metrics default http-json? http-proto?

Enables metrics of opentelemetry, opentelemetry-proto, and opentelemetry_sdk

logs default

Enables logs of opentelemetry, opentelemetry-proto, and opentelemetry_sdk

populate-logs-event-name

Enables populate-logs-event-name of opentelemetry-proto

internal-logs default = tracing
serialize = serde, serde_json

add ons

default = grpc-tonic, internal-logs, logs, metrics, trace

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

grpc-tonic default = http, prost, tokio, tonic

grpc using tonic

Enables gen-tonic of opentelemetry-proto

Affects exporter::OTEL_EXPORTER_OTLP_PROTOCOL_DEFAULT, opentelemetry-otlp::TonicExporterBuilderSet

gzip-tonic

Enables gzip of tonic

zstd-tonic

Enables zstd of tonic

tls tls-roots? tls-webpki-roots?

Enables tls of tonic

Affects tonic::WithTonicConfig.with_tls_config

tls-roots = tls

Enables tls-roots of tonic

tonic:

Deprecated. Please use tls-native-roots instead.

tls-webpki-roots = tls

Enables tls-webpki-roots of tonic

http-proto = http, metrics, opentelemetry-http, prost, trace

http binary

Enables gen-tonic-messages of opentelemetry-proto

Affects exporter::OTEL_EXPORTER_OTLP_PROTOCOL_DEFAULT, opentelemetry-otlp::HttpExporterBuilderSet

http-json = http, metrics, opentelemetry-http, prost, serde_json, trace

Enables gen-tonic-messages and with-serde of opentelemetry-proto

Affects exporter::OTEL_EXPORTER_OTLP_PROTOCOL_DEFAULT, opentelemetry-otlp::HttpExporterBuilderSet

reqwest-blocking-client

Enables reqwest of opentelemetry-http, blocking of reqwest

reqwest-client = reqwest

Enables reqwest of opentelemetry-http

reqwest-rustls = reqwest

Enables reqwest-rustls of opentelemetry-http

reqwest-rustls-webpki-roots = reqwest

Enables reqwest-rustls-webpki-roots of opentelemetry-http

hyper-client

Enables hyper of opentelemetry-http

integration-testing = prost, tonic, trace

test

Enables full of tokio

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 http-json? http-proto? hyper-client? reqwest-blocking-client? reqwest-client? reqwest-rustls? reqwest-rustls-webpki-roots?
tracing internal-logs
prost grpc-tonic http-json? http-proto? integration-testing?
tonic grpc-tonic gzip-tonic? integration-testing? tls? tls-roots? tls-webpki-roots? zstd-tonic?
tokio grpc-tonic integration-testing?
reqwest reqwest-blocking-client? reqwest-client? reqwest-rustls? reqwest-rustls-webpki-roots?
http grpc-tonic http-json? http-proto?
serde serialize?
serde_json http-json? serialize?