opencensus-context
OpenCensus Runtime Context
Decision gist · record as of 2026-08-14
No—install only as a transitive dependency of opencensus. The package is abandoned (last release 2022-08-03, repository archived), receives no maintenance, and is not meant for direct use. If you need distributed tracing, install opencensus itself, which includes this library automatically.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- This package is abandoned and not actively maintained; consider whether the opencensus project itself remains suitable for your use case.
- Low install friction with a single pure-Python wheel dependency.
- However, the package is abandoned as of 2022-08-03 with no active maintenance, and the repository is archived.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in most projects without significant restriction, though you assume responsibility for any future maintenance.
last release 2022-08-03 (1472 days) · last repo commit 2025-06-12 · 676 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 23,886,790 downloads/mo, #931 on PyPI
Alternatives
Verify before relying
# Typically installed as a transitive dependency of opencensus
# Direct usage example for explicit thread context propagation:
from threading import Thread
from opencensus.common.runtime_context import RuntimeContext
def work(name):
print(RuntimeContext)
thread = Thread(
target=RuntimeContext.with_current_context(work),
args=('example',),
)
thread.start()
thread.join()- Whether the package works reliably with Python versions beyond 3.9 despite no recent updates
- Whether contextvars behavior has changed in newer Python releases in ways that could affect this library
What it is and what it does
OpenCensus Runtime Context is a small library that manages in-process context propagation for distributed tracing. It abstracts away the differences between Python versions: for Python 2.7 and 3.4–3.5 it uses thread-local storage, while for Python 3.6+ it uses the standard contextvars module, which provides native asyncio support. The library is typically used as a dependency of the larger opencensus package rather than installed directly.
The main use case is ensuring that tracing context (like span IDs and trace IDs) automatically flows through your code as it executes across threads and async tasks. When you need explicit control—such as when spawning new threads or using thread pools—you can wrap your callable with `RuntimeContext.with_current_context()` to carry the parent context forward.
Use it for
- Automatic context propagation in multi-threaded applications using OpenCensus tracing
- Preserving trace context when spawning explicit threads or using thread pools
- Supporting async/await code with native contextvars in Python 3.6+
- Maintaining backward compatibility with older Python versions that lack contextvars
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No—install only as a transitive dependency of opencensus.
The package is abandoned (last release 2022-08-03, repository archived), receives no maintenance, and is not meant for direct use. If you need distributed tracing, install opencensus itself, which includes this library automatically.
Install
opencensus-context on PyPI
Before you install
Low install friction with a single pure-Python wheel dependency. However, the package is abandoned as of 2022-08-03 with no active maintenance, and the repository is archived.
This package is abandoned and not actively maintained; consider whether the opencensus project itself remains suitable for your use case.
License in practice
Apache-2.0 permissive license allows use in most projects without significant restriction, though you assume responsibility for any future maintenance.
Quickstart
# Typically installed as a transitive dependency of opencensus
# Direct usage example for explicit thread context propagation:
from threading import Thread
from opencensus.common.runtime_context import RuntimeContext
def work(name):
print(RuntimeContext)
thread = Thread(
target=RuntimeContext.with_current_context(work),
args=('example',),
)
thread.start()
thread.join()
Verify before relying
- Whether the package works reliably with Python versions beyond 3.9 despite no recent updates
- Whether contextvars behavior has changed in newer Python releases in ways that could affect this library
Package facts
| License | Apache-2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagecontextvars |
| Maintenance | Abandoned 1,472 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 23,886,790 / month, #931 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: opencensus_context-0.1.3-py2.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 › “opencensus runtime context”
- opencensus-contextProvides in-process context propagation for OpenCensus, automatically…
- opencensus-ext-loggingEnriches Python log records with OpenCensus trace context (trace ID,…
- opencensusOpenCensus provides distributed tracing and stats collection for…
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 opencensus · opentelemetry-instrumentation-threading · contextvars · opencensus-ext-flask · opencensus-ext-logging · aiocontextvars · opencensus-ext-requests · opentracing · openinference-instrumentation-mcp · Flask-Threads