opentelemetry-instrumentation-urllib
OpenTelemetry urllib instrumentation
Install
opentelemetry-instrumentation-urllib on PyPI
pip
pip install opentelemetry-instrumentation-urllibuv
uv add opentelemetry-instrumentation-urllibpoetry
poetry add opentelemetry-instrumentation-urllibPackage facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, opentelemetry-util-http |
| Maintenance | actively maintained — 28 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: opentelemetry_instrumentation_urllib-0.65b0-py3-none-any.whl
About opentelemetry-instrumentation-urllib
from the package's own PyPI description — quoted content, verbatim
OpenTelemetry urllib Instrumentation
|pypi|
.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-urllib.svg :target: https://pypi.org/project/opentelemetry-instrumentation-urllib/
This library allows tracing HTTP requests made by the
urllib <https://docs.python.org/3/library/urllib.html>_ library.
Installation
::
pip install opentelemetry-instrumentation-urllib
Configuration
Request/Response hooks
The urllib instrumentation supports extending tracing behavior with the help of request and response hooks. These are functions that are called back by the instrumentation right after a Span is created for a request and right before the span is finished processing a response respectively. The hooks can be configured as follows:
.. code:: python
from opentelemetry.instrumentation.urllib import URLLibInstrumentor
# `request_obj` is an instance of urllib.request.Request
def request_hook(span, request_obj):
pass
# `request_obj` is an instance of urllib.request.Request
# `response` is an instance of http.client.HTTPResponse
def...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Automatically traces HTTP requests made by Python's urllib library, capturing request/response details and timing for OpenTelemetry observability.
Low friction install with four stable OpenTelemetry dependencies. Actively maintained with recent releases (28 days old) and a healthy repository (1086 stars), though still in beta status.
Apache-2.0 permissive license allows commercial and private use with minimal restrictions, typical for OpenTelemetry ecosystem packages.
Usage
pip install opentelemetry-instrumentation-urllib
from opentelemetry.instrumentation.urllib import URLLibInstrumentor
URLLibInstrumentor().instrument()
Requires Python 3.10 or later; OpenTelemetry API and instrumentation packages must be installed and configured with a working tracer provider.
Verdict: A well-maintained, low-friction instrumentation package for urllib tracing within the OpenTelemetry ecosystem. Beta status and no known vulnerabilities make it suitable for observability-focused projects, though production deployments should verify compatibility with your tracer backend.
Needs verification
- Whether the beta status (0.65b0) indicates planned API changes or stability concerns before 1.0 release.
- Performance overhead of instrumentation on high-volume urllib request workloads.
Similar packages
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-urllib3permissive · top 1,000 on PyPI
opentelemetry-instrumentation-httpxpermissive · top 1,000 on PyPI
opentelemetry-instrumentation-sqlalchemypermissive · top 1,000 on PyPI
opentelemetry-instrumentation-aiohttp-clientpermissive · top 1,000 on PyPI
opentelemetry-instrumentation-redispermissive · top 1,000 on PyPI
opentelemetry-instrumentation-psycopg2permissive · top 1,000 on PyPI
opentelemetry-instrumentation-djangopermissive · top 1,000 on PyPI
opentelemetry-instrumentation-flaskpermissive · top 1,000 on PyPI
opentelemetry-instrumentation-dbapipermissive · top 1,000 on PyPI