You are here: Home / LBN / Up2date / Network Monitoring / BastionLinux 36 / python3-opentelemetry-util-http-0.49b2-1.lbn36.noarch

python3-opentelemetry-util-http-0.49b2-1.lbn36.noarch

Package Attributes
RPM  python3-opentelemetry-util-http-0.49b2-1.lbn36.noarch.rpm Architecture  noarch Size  27823 Created  2024/11/20 13:36:43 UTC
Package Specification
Summary Web util for OpenTelemetry
Group Unspecified
License ZPL
Home Page https://pypi.org/project/opentelemetry-util-http
Description

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 Op

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(PayloadIsZstd)  
rpmlib(CompressedFileNames)  
rpmlib(PartialHardlinkSets)  
rpmlib(TildeInVersions)  
rpmlib(FileDigests)  
Provides
python-opentelemetry-util-http
python3-opentelemetry-util-http
python3.10-opentelemetry-util-http
python3.10dist(opentelemetry-util-http)
python3dist(opentelemetry-util-http)
Obsoletes
python-opentelemetry-util-http

Document Actions