Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pypi

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)

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.

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)

from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware

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

References

Metadata

Release files for opentelemetry-util-http 0.58b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opentelemetry-util-http 0.58b0
File Size Uploaded Provenance Actions
opentelemetry_util_http-0.58b0.tar.gz 9.4 kB Without provenance Details for opentelemetry_util_http-0.58b0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opentelemetry-util-http 0.58b0
File Interpreter ABI Platform Actions
opentelemetry_util_http-0.58b0-py3-none-any.whl Python 3 none any Details for opentelemetry_util_http-0.58b0-py3-none-any.whl

Total release size: 17.1 kB

Release files / opentelemetry_util_http-0.58b0.tar.gz

Download URL opentelemetry_util_http-0.58b0.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
de0154896c3472c6599311c83e0ecee856c4da1b17808d39fdc5cce5312e4d89
BLAKE2b-256 checksum
How to use checksums
c65f02f31530faf50ef8a41ab34901c05cbbf8e9d76963ba2fb852b0b4065f4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / opentelemetry_util_http-0.58b0-py3-none-any.whl

Download URL opentelemetry_util_http-0.58b0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c6b86762ed43025fbd593dc5f700ba0aa3e09711aedc36fd48a13b23d8cb1e7
BLAKE2b-256 checksum
How to use checksums
a5a30a1430c42c6d34d8372a16c104e7408028f0c30270d8f3eb6cccf2e82934
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Security for opentelemetry-util-http 0.58b0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page