skillfed

opencensus-ext-requests

OpenCensus Requests Integration

opencensus-ext-requests v0.8.0 140.7K downloads/30d#11,264 on PyPI676
Permissive license Apache-2.0 Abandoned released

What it is and what it does

This package adds automatic tracing instrumentation to HTTP requests made via the requests library, integrating them into OpenCensus's distributed tracing system. When enabled, it captures request metadata (URL, method, status code) and emits trace spans that can be exported to observability backends. It depends on opencensus, requests, and wrapt, and is configured by registering 'requests' in OpenCensus's trace_integrations list.

The package allows you to exclude specific hostnames from tracing (useful to avoid tracing calls to your own exporters) and integrates transparently once the integration is registered. However, the project is archived and abandoned since August 2022, with no ongoing maintenance or updates. It remains functional for existing deployments but should not be chosen for new projects without careful consideration of long-term support needs.

Use it for:

  • Trace outbound HTTP requests in a microservice to understand call chains and latency across service boundaries.
  • Collect request metadata (method, URL, status) automatically without modifying individual request call sites.
  • Exclude internal exporter traffic from traces to keep trace data clean and reduce noise.
  • Integrate requests tracing into an existing OpenCensus observability pipeline for unified telemetry.
  • Debug HTTP request failures by correlating request traces with other service telemetry.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates OpenCensus distributed tracing with the requests HTTP library, automatically collecting trace data for HTTP requests including URL, method, and response status.

No for new projects. The package is abandoned and unmaintained since August 2022. If you are already using OpenCensus and need requests tracing, it may work, but you should evaluate actively maintained alternatives (such as OpenTelemetry instrumentation for requests) before committing to this package. Existing deployments can continue to use it if it is stable in your environment, but do not adopt it for new work.

Install

opencensus-ext-requests on PyPI

pip

pip install opencensus-ext-requests

uv

uv add opencensus-ext-requests

poetry

poetry add opencensus-ext-requests

Installing opencensus-ext-requests

Before you install

Low install friction with three straightforward runtime dependencies. However, the package is abandoned as of 2022-08-03 with no active maintenance; the repository is archived. Use only if you are already committed to the OpenCensus ecosystem and cannot migrate to an actively maintained alternative.

License in practice

Licensed under Apache-2.0 (permissive), which allows commercial and private use with minimal restrictions. No notable licensing constraints for most users.

Quickstart

pip install opencensus-ext-requests

import requests
from opencensus.trace import config_integration
from opencensus.trace.tracer import Tracer

config_integration.trace_integrations(['requests'])
tracer = Tracer()
with tracer.span(name='parent'):
    response = requests.get(url='https://www.wikipedia.org/wiki/Rabbit')

Requires OpenCensus to be installed and configured; the tracer must be initialized before requests are made within a traced span.

Verify before relying

  • Whether the package works reliably with modern Python versions beyond 3.9 despite classifier claims.
  • Whether abandonment affects compatibility with recent versions of requests or wrapt dependencies.
  • Whether there are known issues or breaking changes in the final 0.8.0 release.

Package facts

License Apache-2.0 (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 3 — opencensus, requests, wrapt
Maintenance abandoned — 1,472 days since the last release
Last repo commit (repository archived)
First released
Downloads 140,714/month — #11,264 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: opencensus_ext_requests-0.8.0-py2.py3-none-any.whl

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

Tags

opencensus requests tracinghttp request tracingdistributed tracing requests libraryrequest instrumentationtrace http callsopencensus integrationrequest span collection
distributed-tracingobservabilityabandoned

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

opencensus-ext-flask

Adds distributed tracing instrumentation to…

permissive · top 15,000 on PyPI

opencensus-ext-logging

Enriches Python log records with OpenCensus…

permissive · top 15,000 on PyPI

opencensus

OpenCensus provides distributed tracing and…

permissive · top 1,000 on PyPI

opencensus-context

Provides in-process context propagation for…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation-requests

Automatically captures and traces HTTP requests…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation-django

Adds distributed tracing to Django applications…

permissive · top 1,000 on PyPI

azure-core-tracing-opentelemetry

Integrates Azure SDK clients with OpenTelemetry…

unclear · top 5,000 on PyPI

opentelemetry-instrumentation-boto

Adds distributed tracing to AWS SDK (Boto)…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-redis

Adds distributed tracing to Redis client calls…

permissive · top 1,000 on PyPI