opencensus-ext-logging
OpenCensus logging Integration
Decision gist · record as of 2026-08-14
Yes, if you are already using OpenCensus for tracing and need log correlation—the integration is straightforward and permissively licensed. However, be aware the package is abandoned (last release October 2021) and may not be compatible with recent Python or opencensus versions. Consider whether your tracing infrastructure still supports OpenCensus or whether you should migrate to a maintained alternative like OpenTelemetry.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires opencensus to be installed and configured; loggers must be created after calling config_integration.trace_integrations(['logging']) for enrichment to take effect.
- Low install friction with a single runtime dependency on opencensus.
- However, the package is abandoned as of 2021-10-05 with no recent maintenance, though the repository was archived and last commit is recent (2025-06-12), suggesting the parent project may still have minimal activity.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing use in most commercial and open-source projects without significant restrictions.
last release 2021-10-05 (1774 days) · last repo commit 2025-06-12 · 676 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 484,731 downloads/mo, #6,402 on PyPI
Alternatives
Verify before relying
pip install opencensus-ext-logging
import logging
from opencensus.trace import config_integration
from opencensus.trace.samplers import AlwaysOnSampler
from opencensus.trace.tracer import Tracer
config_integration.trace_integrations(['logging'])
logging.basicConfig(format='%(asctime)s traceId=%(traceId)s spanId=%(spanId)s %(message)s')
tracer = Tracer(sampler=AlwaysOnSampler())
logger = logging.getLogger(__name__)
with tracer.span(name='hello'):
logger.warning('In the span')- Whether the package works reliably with Python versions beyond 3.9 (classifiers list up to 3.9 but no explicit requires_python constraint).
- Current compatibility with modern opencensus versions and whether breaking changes have occurred since the 2021 release.
What it is and what it does
opencensus-ext-logging is a plugin that integrates Python's standard logging module with OpenCensus distributed tracing. It automatically adds trace ID, span ID, and sampling flag to every log record, enabling logs to be correlated with traces across distributed systems. This is useful when you need to follow a single request through multiple services and want both trace and log data to reference the same context.
The integration works by hooking into the logging system after you call config_integration.trace_integrations(['logging']). Any logger created after that point will have access to traceId, spanId, and traceSampled attributes in its format string. The package depends only on opencensus itself and has low install friction, but it is no longer actively maintained—the last release was in October 2021, and the parent repository is archived.
Use it for
- Correlate application logs with distributed traces in microservices by including trace IDs in log output.
- Debug multi-service requests by matching log entries to their corresponding trace spans across systems.
- Format log messages to include trace context for centralized logging platforms that support trace-log correlation.
- Verify which requests were sampled by including the sampling flag in logs alongside trace data.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are already using OpenCensus for tracing and need log correlation—the integration is straightforward and permissively licensed.
However, be aware the package is abandoned (last release October 2021) and may not be compatible with recent Python or opencensus versions. Consider whether your tracing infrastructure still supports OpenCensus or whether you should migrate to a maintained alternative like OpenTelemetry.
Install
opencensus-ext-logging on PyPI
Before you install
Low install friction with a single runtime dependency on opencensus. However, the package is abandoned as of 2021-10-05 with no recent maintenance, though the repository was archived and last commit is recent (2025-06-12), suggesting the parent project may still have minimal activity.
Requires opencensus to be installed and configured; loggers must be created after calling config_integration.trace_integrations(['logging']) for enrichment to take effect.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in most commercial and open-source projects without significant restrictions.
Quickstart
pip install opencensus-ext-logging
import logging
from opencensus.trace import config_integration
from opencensus.trace.samplers import AlwaysOnSampler
from opencensus.trace.tracer import Tracer
config_integration.trace_integrations(['logging'])
logging.basicConfig(format='%(asctime)s traceId=%(traceId)s spanId=%(spanId)s %(message)s')
tracer = Tracer(sampler=AlwaysOnSampler())
logger = logging.getLogger(__name__)
with tracer.span(name='hello'):
logger.warning('In the span')
Verify before relying
- Whether the package works reliably with Python versions beyond 3.9 (classifiers list up to 3.9 but no explicit requires_python constraint).
- Current compatibility with modern opencensus versions and whether breaking changes have occurred since the 2021 release.
Package facts
| License | Apache-2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageopencensus |
| Maintenance | Abandoned 1,774 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 484,731 / month, #6,402 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_ext_logging-0.1.1-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 logging integration”
- opencensus-ext-loggingEnriches Python log records with OpenCensus trace context (trace ID,…
- opencensus-ext-azureExports logs, metrics, and traces from Python applications to Azure…
- opencensus-ext-requestsIntegrates OpenCensus distributed tracing with the requests HTTP…
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 · opencensus-ext-requests · opencensus-ext-flask · opencensus-ext-azure · opencensus-context · opentelemetry-instrumentation-mcp · azure-core-tracing-opentelemetry · opentelemetry-instrumentation-haystack · opentelemetry-instrumentation-structlog · ovs-dbg