opentelemetry-instrumentation-threading
Thread context propagation support for OpenTelemetry
Decision gist · record as of 2026-08-14
Yes, if you are already using OpenTelemetry and your application uses Python's threading module. It is a low-friction, actively maintained plugin that solves a real problem—context loss across threads—with no telemetry overhead. Not necessary if you use only async/await or do not use distributed tracing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; intended for use within an OpenTelemetry tracing setup that produces and exports telemetry data.
- Low friction install with three stable runtime dependencies (opentelemetry-api, opentelemetry-instrumentation, wrapt).
- Active maintenance with recent release (29 days old) and ongoing repository activity.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; attribution required.
last release 2026-07-16 (29 days) · last repo commit 2026-08-13 · 1,086 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 174,866,667 downloads/mo, #242 on PyPI
Alternatives
Verify before relying
pip install opentelemetry-instrumentation-threading
from opentelemetry.instrumentation.threading import ThreadingInstrumentor
ThreadingInstrumentor().instrument()- Whether context propagation works correctly with thread pools and concurrent.futures executors.
- Performance overhead of instrumentation on high-concurrency workloads.
- Compatibility with asyncio or other async frameworks beyond standard threading.
What it is and what it does
This package is an instrumentation plugin for OpenTelemetry that automatically propagates tracing context when Python threads are created and started. It does not generate telemetry events itself; instead, it acts as a bridge ensuring that any spans or trace IDs active in a parent thread are correctly inherited by child threads, so distributed traces remain coherent across thread boundaries.
The package depends on opentelemetry-api and opentelemetry-instrumentation to hook into the threading module and manage context lifecycle. It is designed for applications that use Python's standard threading module and need end-to-end tracing visibility across concurrent execution paths. Installation is straightforward and the package is actively maintained with support for Python 3.10 through 3.14.
Use it for
- Tracing multi-threaded backend services to see how requests flow across worker threads.
- Debugging concurrent workloads where spans need to remain connected across thread boundaries.
- Ensuring OpenTelemetry traces remain coherent in thread-based parallelism within a larger observability pipeline.
- Instrumenting legacy Python applications that use threading.Thread without rewriting to async.
- Validating that context variables and trace IDs propagate correctly in thread pools.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are already using OpenTelemetry and your application uses Python's threading module.
It is a low-friction, actively maintained plugin that solves a real problem—context loss across threads—with no telemetry overhead. Not necessary if you use only async/await or do not use distributed tracing.
Install
opentelemetry-instrumentation-threading on PyPI
Before you install
Low friction install with three stable runtime dependencies (opentelemetry-api, opentelemetry-instrumentation, wrapt). Active maintenance with recent release (29 days old) and ongoing repository activity.
Requires Python 3.10 or later; intended for use within an OpenTelemetry tracing setup that produces and exports telemetry data.
License in practice
Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; attribution required.
Quickstart
pip install opentelemetry-instrumentation-threading
from opentelemetry.instrumentation.threading import ThreadingInstrumentor
ThreadingInstrumentor().instrument()
Verify before relying
- Whether context propagation works correctly with thread pools and concurrent.futures executors.
- Performance overhead of instrumentation on high-concurrency workloads.
- Compatibility with asyncio or other async frameworks beyond standard threading.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesopentelemetry-apiopentelemetry-instrumentationwrapt |
| Maintenance | Actively maintained 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 174,866,667 / month, #242 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: opentelemetry_instrumentation_threading-0.65b0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “opentelemetry threading context propagation”
- opentelemetry-instrumentation-threadingEnsures OpenTelemetry context is propagated across Python threads,…
- opencensus-contextProvides in-process context propagation for OpenCensus, automatically…
- opentelemetry-propagator-b3Implements the B3 trace context propagation format for OpenTelemetry,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Monitoring packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.
Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.
Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.
Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.
Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.
Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.
Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.
Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.
See also opentelemetry-instrumentation-django · otel-extensions · opentelemetry-instrumentation-logging · zthreading · opencensus-context · vercel-internal-telemetry · opentelemetry-instrumentation-sklearn · opentelemetry-instrumentation-kafka-python · opentelemetry-instrumentation-flask · opentelemetry-processor-baggage