# opentelemetry-util-http

> Web util for OpenTelemetry

- **URL**: https://www.freshcrate.ai/projects/opentelemetry-util-http
- **Author**: pypi
- **Category**: Frameworks
- **Latest version**: `v0.63b1` (2026-05-21)
- **License**: Unknown
- **Source**: https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/util/opentelemetry-util-http
- **Homepage**: https://pypi.org/project/opentelemetry-util-http/
- **Language**: Python
- **GitHub**: 1,031 stars, 932 forks
- **Registry**: pypi (`opentelemetry-util-http`)
- **Tags**: `pypi`

## 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', 'asgi_example.settings')

    application = get_asgi_application()
    application = OpenTelemetryMiddleware(application)


Usage (Raw ASGI)
----------------

.. code-block:: python

    from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware

    app = ...  # An ASGI application.
    app = OpenTelemetryMiddleware(app)


References
----------

* `OpenTelemetry Project <https://opentelemetry.io/>`_

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v0.63b1` | 2026-05-21 | High | This is a patch release on the previous 1.42.0/0.63b0 release, fixing the issue(s) below. |
| `opentelemetry-instrumentation-google-genai==0.7b1` | 2026-05-19 | High | This is a patch release on the previous 0.7b0 release, fixing the issue(s) below. |
| `opentelemetry-instrumentation-openai-v2==2.4b0` | 2026-05-01 | High | - Migrate experimental path from deprecated `LLMInvocation` to `InferenceInvocation`, using `handler.start_inference()` and `invocation.stop()`/`invocation.fail()` directly ([#4502](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4502)) - Use `create_duration_histogram` and `create_token_histogram` from `opentelemetry-util-genai` instead of defining bucket boundaries locally ([#4501](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4501)) - Import `OTEL_I |
| `v0.62b1` | 2026-04-24 | High | This is a patch release on the previous 1.41.0/0.62b0 release, fixing the issue(s) below.   ### Fixed  - `opentelemetry-instrumentation-pika` Use `ObjectProxy` instead of `BaseObjectProxy` for `ReadyMessagesDequeProxy` to restore iterability with wrapt 2.x ([#4461](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4461)) - `opentelemetry-instrumentation-dbapi` Use `ObjectProxy` instead of `BaseObjectProxy` for `TracedCursorProxy` to restore iterability with wrapt 2.x ([#4427](h |
| `0.62b0` | 2026-04-21 | Low | Imported from PyPI (0.62b0) |
| `v0.62b0` | 2026-04-09 | Medium | ### Added  - `opentelemetry-instrumentation-asgi`: Respect `suppress_http_instrumentation` context in ASGI middleware to skip server span creation when HTTP instrumentation is suppressed ([#4375](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4375)) - `opentelemetry-instrumentation-confluent-kafka`: Loosen confluent-kafka upper bound to <3.0.0 ([#4289](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4289)) - `opentelemetry-instrumentation`: Add support |
| `v0.62b0` | 2026-04-09 | Medium | ### Added  - `opentelemetry-instrumentation-asgi`: Respect `suppress_http_instrumentation` context in ASGI middleware to skip server span creation when HTTP instrumentation is suppressed ([#4375](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4375)) - `opentelemetry-instrumentation-confluent-kafka`: Loosen confluent-kafka upper bound to <3.0.0 ([#4289](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4289)) - `opentelemetry-instrumentation`: Add support |
| `v0.62b0` | 2026-04-09 | Medium | ### Added  - `opentelemetry-instrumentation-asgi`: Respect `suppress_http_instrumentation` context in ASGI middleware to skip server span creation when HTTP instrumentation is suppressed ([#4375](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4375)) - `opentelemetry-instrumentation-confluent-kafka`: Loosen confluent-kafka upper bound to <3.0.0 ([#4289](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4289)) - `opentelemetry-instrumentation`: Add support |
| `opentelemetry-opamp-client==0.2b0` | 2026-04-01 | Medium | - Breaking change: callback class `Callbacks` renamed to `OpAMPCallbacks` ([#4355](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4355)) |
| `opentelemetry-opamp-client==0.1b0` | 2026-03-23 | Medium | - Initial implementation ([#3635](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3635)) - Update client to have additional callback methods ([#4322](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4322)) |

## Citation

- HTML: https://www.freshcrate.ai/projects/opentelemetry-util-http
- Markdown: https://www.freshcrate.ai/projects/opentelemetry-util-http.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/opentelemetry-util-http/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
