{"id":4152,"library":"opentelemetry-exporter-jaeger-thrift","title":"Jaeger Thrift Exporter for OpenTelemetry","description":"The opentelemetry-exporter-jaeger-thrift library allows exporting OpenTelemetry traces to Jaeger using the Thrift protocol over UDP (to an agent) or HTTP (to a collector). This specific exporter, currently at version 1.21.0, is officially deprecated and no longer actively tested; users are strongly encouraged to migrate to the OpenTelemetry Protocol (OTLP) exporter, as Jaeger natively supports OTLP since version 1.35. The broader OpenTelemetry Python project has a regular, frequent release cadence, but this exporter module has ceased active development and testing.","status":"maintenance","version":"1.21.0","language":"en","source_language":"en","source_url":"https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-jaeger-thrift","tags":["opentelemetry","jaeger","exporter","observability","tracing","thrift","deprecated"],"install":[{"cmd":"pip install opentelemetry-exporter-jaeger-thrift","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core OpenTelemetry API for defining and interacting with telemetry.","package":"opentelemetry-api","optional":false},{"reason":"OpenTelemetry SDK, providing implementation for API calls and managing telemetry pipelines.","package":"opentelemetry-sdk","optional":false},{"reason":"Required for the Thrift serialization protocol used by this exporter.","package":"thrift","optional":false}],"imports":[{"note":"The `opentelemetry.ext` path is deprecated; use the direct `opentelemetry.exporter.jaeger.thrift` import.","wrong":"from opentelemetry.ext import jaeger; jaeger.JaegerSpanExporter","symbol":"JaegerExporter","correct":"from opentelemetry.exporter.jaeger.thrift import JaegerExporter"}],"quickstart":{"code":"import os\nfrom opentelemetry import trace\nfrom opentelemetry.exporter.jaeger.thrift import JaegerExporter\nfrom opentelemetry.sdk.resources import Resource, SERVICE_NAME\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import BatchSpanProcessor\n\n# Ensure Jaeger Agent is running, e.g., via Docker: docker run -d --name jaeger -p 6831:6831/udp -p 16686:16686 jaegertracing/all-in-one:latest\n\n# Configure the TracerProvider\ntrace.set_tracer_provider(\n    TracerProvider(\n        resource=Resource.create({SERVICE_NAME: \"my-jaeger-service\"})\n    )\n)\n\n# Configure JaegerExporter (defaults to agent_host_name='localhost', agent_port=6831)\njaeger_exporter = JaegerExporter(\n    service_name=os.environ.get('OTEL_SERVICE_NAME', 'my-python-app'),\n    agent_host_name=os.environ.get('JAEGER_AGENT_HOST', 'localhost'),\n    agent_port=int(os.environ.get('JAEGER_AGENT_PORT', 6831))\n)\n\n# Add the exporter to a BatchSpanProcessor and then to the TracerProvider\ntrace.get_tracer_provider().add_span_processor(\n    BatchSpanProcessor(jaeger_exporter)\n)\n\n# Get a tracer and create some spans\ntracer = trace.get_tracer(__name__)\n\nwith tracer.start_as_current_span(\"root-operation\"):\n    print(\"Starting root operation...\")\n    with tracer.start_as_current_span(\"child-work\"):\n        print(\"Performing child work...\")\n    print(\"Root operation finished.\")\n\n# Spans will be sent to Jaeger Agent, viewable at http://localhost:16686 (if running locally)\n","lang":"python","description":"This example demonstrates how to configure the Jaeger Thrift exporter to send traces to a local Jaeger Agent. It sets up a TracerProvider with a service name, initializes the `JaegerExporter` (which by default connects to `localhost:6831`), adds it to a `BatchSpanProcessor`, and then creates a simple trace with parent and child spans. Ensure a Jaeger Agent is running and accessible on the specified host and port for traces to be received. For production environments or newer Jaeger versions, migrating to the OTLP exporter is recommended."},"warnings":[{"fix":"Migrate to `pip install opentelemetry-exporter-otlp` and configure `OTLPSpanExporter`. Update Jaeger Collector/Agent to a version that supports OTLP (>=1.35).","message":"This `opentelemetry-exporter-jaeger-thrift` package is officially deprecated and no longer actively tested since late 2023. Jaeger itself supports the OpenTelemetry Protocol (OTLP) natively since version 1.35. All new deployments and existing users should migrate to the `opentelemetry-exporter-otlp` package for improved compatibility, features, and active maintenance.","severity":"breaking","affected_versions":">=1.22.0 (effectively, as active support ended)"},{"fix":"Update imports from `from opentelemetry.ext import jaeger` to `from opentelemetry.exporter.jaeger.thrift import JaegerExporter`.","message":"The `opentelemetry.ext` import path for Jaeger exporter (e.g., `from opentelemetry.ext import jaeger`) is deprecated. Use the direct exporter module path.","severity":"deprecated","affected_versions":"<1.0.0 (API/SDK); generally discouraged since 1.0.0, though old paths might still work for some time."},{"fix":"Reduce the batch size of spans (`BatchSpanProcessor(max_queue_size=..., max_export_batch_size=...)`), or preferably, switch to OTLP exporter which often uses gRPC or HTTP, mitigating UDP size limits. Ensure your Jaeger Agent/Collector configuration can handle large payloads if using HTTP.","message":"When exporting to a Jaeger Agent via UDP, exceeding the maximum UDP packet size can lead to dropped spans and potentially leave the exporter in a broken state, preventing further span exports. This is a common issue with Thrift UDP transport.","severity":"gotcha","affected_versions":"All versions using UDP agent export"},{"fix":"Double-check `agent_host_name` and `agent_port` (or `collector_host_name`, `collector_port`, `collector_endpoint` for HTTP) parameters. Verify that your Jaeger Agent/Collector is running and listening on the expected network interfaces and ports (e.g., `localhost:6831/udp` for agent, `localhost:14268/api/traces?format=jaeger.thrift` for collector HTTP).","message":"Incorrect Jaeger Agent/Collector host or port configuration, or the Jaeger backend not running/accessible, will result in traces not being sent or received. There might be no explicit error if UDP is used, leading to silent data loss.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}