skillfed

opentelemetry-instrumentation-urllib

OpenTelemetry urllib instrumentation

opentelemetry-instrumentation-urllib Permissive license Apache-2.0 Active 1,086 v0.65b0 released

Install

opentelemetry-instrumentation-urllib on PyPI

pip

pip install opentelemetry-instrumentation-urllib

uv

uv add opentelemetry-instrumentation-urllib

poetry

poetry add opentelemetry-instrumentation-urllib

Package 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

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

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.
urllib http tracingopentelemetry urllib instrumentationhttp request observability pythondistributed tracing urllibopentelemetry http instrumentation

Similar packages