Migrate tracing from jaeger-client to OpenTelemetry
Problem
The jaeger-client Python library is archived and incompatible with Python 3.12 (its dependency chain crashes with AttributeError due to removed collections.MutableMapping).
Solution
Migrate the tracing subsystem from the archived jaeger-client to the OpenTelemetry SDK with OTLP gRPC exporter, which is the officially recommended replacement.
Changes
- Replace
jaeger_clientimport withopentelemetrySDK packages ingluetool/action.py - Rewrite
Tracerto useTracerProvider+OTLPSpanExporter - Replace
GLUETOOL_TRACING_REPORTING_HOST/GLUETOOL_TRACING_REPORTING_PORTenv vars with singleGLUETOOL_TRACING_REPORTING_ENDPOINT(defaulthttp://localhost:4317) - Update
Actionspan API:finish()→end(),set_tag()→set_attribute(),child_of→context - Simplify
Tracer.close()to useprovider.force_flush()+shutdown() - Add
opentelemetry-sdkandopentelemetry-exporter-otlp-proto-grpcas dev dependencies - Remove
jaeger_clientsection frommypy.ini - Update logger handling in
gluetool/log.pyfromjaeger_tracingtoopentelemetry
Companion MR
-
gluetool-modules!1042 — replaces
jaeger-clientdependency with OpenTelemetry packages
Assisted-by: Claude Code
Edited by Miroslav Vadkerti