--- id: opentelemetry-util-http version: "0.65b0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # opentelemetry-util-http — Web util for OpenTelemetry License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install opentelemetry-util-http uv add opentelemetry-util-http poetry add opentelemetry-util-http ## Description OpenTelemetry Util HTTP ======================= |pypi| .. |pypi| image:: https://badge.fury.io/py/opentelemetry-util-http.svg :target: https://pypi.org/project/opentelemetry-util-http/ This library provides ASGI, WSGI middleware and other HTTP-related functionality that is common to instrumented web frameworks (such as Django, Starlette, FastAPI, etc.) to track requests timing through OpenTelemetry. Installation ------------ :: pip install opentelemetry-util-http Usage (Quart) ------------- .. code-block:: python from quart import Quart from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware app = Quart(__name__) app.asgi_app = OpenTelemetryMiddleware(app.asgi_app) @app.route("/") async def hello(): return "Hello!" if __name__ == "__main__": app.run(debug=True) Usage (Django 3.0) ------------------ Modify the application's ``asgi.py`` file as shown below. .. code-block:: python import os from django.core.asgi import get_asgi_application from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware os.environ.setdefault('DJANGO_SETTINGS_MODULE',... ## AI interpretation — verify before relying Provides ASGI and WSGI middleware and HTTP utilities for OpenTelemetry instrumentation of web frameworks like Django, Starlette, and FastAPI to track request timing and performance. Verdict: Active, low-friction utility library for OpenTelemetry HTTP instrumentation with no known vulnerabilities and permissive licensing. Beta status and zero runtime dependencies make it a lightweight choice for adding observability to web frameworks, though users must configure their own OpenTelemetry SDK and exporters. [View on SkillFed](https://skillfed.io/packages/opentelemetry-util-http) · [View on PyPI](https://pypi.org/project/opentelemetry-util-http/)