Cargo Features

[dependencies]
opentelemetry-proto = { version = "0.26.1", default-features = false, features = ["full", "gen-tonic", "gen-tonic-messages", "trace", "metrics", "logs", "zpages", "testing", "with-schemars", "with-serde", "populate-logs-event-name"] }
default = full

The full feature is set by default whenever opentelemetry-proto is added without default-features = false somewhere in the dependency tree.

full default = gen-tonic, logs, metrics, trace, with-serde, zpages
gen-tonic full = gen-tonic-messages

crates used to generate rs files

Enables transport of tonic

Affects opentelemetry.proto.collector.logs.v1::logs_service_client, opentelemetry.proto.collector.logs.v1::logs_service_server, opentelemetry.proto.collector.metrics.v1::metrics_service_client, opentelemetry.proto.collector.metrics.v1::metrics_service_server, opentelemetry.proto.collector.trace.v1::trace_service_client, opentelemetry.proto.collector.trace.v1::trace_service_server

gen-tonic-messages gen-tonic? = prost, tonic

Affects proto::tonic, common::tonic, logs::tonic, metrics::tonic, trace::tonic

trace full zpages?

telemetry pillars and functions

Enables trace of opentelemetry and opentelemetry_sdk

Affects proto::collector.trace, proto::tonic.trace, transform::trace, common::tonic.ResourceAttributesWithSchema

metrics full

Enables metrics of opentelemetry and opentelemetry_sdk

Affects proto::collector.metrics, proto::tonic.metrics, transform::metrics

logs full

Enables logs of opentelemetry and opentelemetry_sdk

Affects proto::collector.logs, proto::tonic.logs, transform::logs, common::tonic.ResourceAttributesWithSchema

zpages full = trace

Affects proto::tonic.tracez, transform::tracez

testing

Enables testing of opentelemetry

with-schemars = schemars

add ons

with-serde full = hex, serde
populate-logs-event-name

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.

tonic gen-tonic? gen-tonic-messages?
prost gen-tonic-messages?
schemars with-schemars?
serde with-serde?
hex with-serde?