This library provides an OpenTelemetry trace exporter for Jaeger, specifically utilizing the Protobuf format over gRPC. It's part of the OpenTelemetry Python Contrib project. The current version is 1.21.0. New releases are frequent and typically align with the broader OpenTelemetry Python SDK release cycle.
pip install opentelemetry-exporter-jaeger-proto-grpcVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to configure the OpenTelemetry SDK with the Jaeger Protobuf gRPC exporter. It sets up a TracerProvider, creates a JaegerExporter targeting a specified endpoint (defaulting to localhost:14250), and exports two simple spans. Ensure a Jaeger agent or collector is running and accessible at the configured endpoint.
Always check PyPI for the exact version of the package you intend to install and use.
Verify your Jaeger collector/agent configuration (Thrift vs. gRPC protocol) and choose the corresponding OpenTelemetry exporter package and import path.
Ensure your Jaeger agent/collector is running and accessible from your application's host. Configure the exporter's endpoint using the `OTEL_EXPORTER_JAEGER_ENDPOINT` environment variable or the `endpoint` parameter in the `JaegerExporter` constructor (default is `localhost:14250`).
Check for `grpcio` and `protobuf` specific installation issues if you encounter problems. Using a virtual environment is highly recommended. For M1 Macs, `grpcio` might require specific compilation flags or pre-built wheels.
Always call `tracer_provider.shutdown()` at the graceful exit point of your application, for example, using a `atexit` hook or within a `try...finally` block in long-running services.