Registry / observability / opentelemetry-otlp

opentelemetry-otlp

JSON →
library0.32.0rscratesunverified

Exporter for sending telemetry data to an OpenTelemetry Collector using the OTLP protocol.

# Cargo.toml [dependencies] opentelemetry-otlp = "0.32.0"
INSTALL
IMPORT
SIG · OPENTELEMETRY-OTLP
O
opentelemetry-otlp
observabilityrustv0.32.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

new_exporter
use opentelemetry_otlp::new_exporter;

Sets up an OTLP exporter and creates a simple span.

use opentelemetry::global; use opentelemetry_otlp::new_exporter; fn main() -> Result<(), Box<dyn std::error::Error>> { let exporter = new_exporter().tonic().build()?; let provider = opentelemetry_otlp::new_pipeline() .with_exporter(exporter) .install_simple()?; global::set_tracer_provider(provider); let tracer = global::tracer("example"); tracer.in_span("operation", |_cx| {}); Ok(()) }
Debug
Known issues
gotchaRequires a running OpenTelemetry Collector or compatible backend to receive data.
fix
Ensure an OTLP receiver is configured and accessible at the default endpoint (localhost:4317).
affects: >=0.32.0
Upgrade
Version history
0.32.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
2
Resources
opentelemetry-otlp — cargo add opentelemetry-otlp · libregistry