Name | opentelemetry-util-http JSON |
Version |
0.56b0
JSON |
| download |
home_page | None |
Summary | Web util for OpenTelemetry |
upload_time | 2025-07-11 12:26:55 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
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/>`_
Raw data
{
"_id": null,
"home_page": null,
"name": "opentelemetry-util-http",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "OpenTelemetry Authors <cncf-opentelemetry-contributors@lists.cncf.io>",
"download_url": "https://files.pythonhosted.org/packages/ce/c5/80c603e44071d172d4e9c909b13e3d9924b90b08a581eff78a8daf77686e/opentelemetry_util_http-0.56b0.tar.gz",
"platform": null,
"description": "OpenTelemetry Util HTTP\n=======================\n\n|pypi|\n\n.. |pypi| image:: https://badge.fury.io/py/opentelemetry-util-http.svg\n :target: https://pypi.org/project/opentelemetry-util-http/\n\n\nThis library provides ASGI, WSGI middleware and other HTTP-related\nfunctionality that is common to instrumented web frameworks (such as Django,\nStarlette, FastAPI, etc.) to track requests timing through OpenTelemetry.\n\nInstallation\n------------\n\n::\n\n pip install opentelemetry-util-http\n\n\nUsage (Quart)\n-------------\n\n.. code-block:: python\n\n from quart import Quart\n from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware\n\n app = Quart(__name__)\n app.asgi_app = OpenTelemetryMiddleware(app.asgi_app)\n\n @app.route(\"/\")\n async def hello():\n return \"Hello!\"\n\n if __name__ == \"__main__\":\n app.run(debug=True)\n\n\nUsage (Django 3.0)\n------------------\n\nModify the application's ``asgi.py`` file as shown below.\n\n.. code-block:: python\n\n import os\n from django.core.asgi import get_asgi_application\n from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware\n\n os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'asgi_example.settings')\n\n application = get_asgi_application()\n application = OpenTelemetryMiddleware(application)\n\n\nUsage (Raw ASGI)\n----------------\n\n.. code-block:: python\n\n from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware\n\n app = ... # An ASGI application.\n app = OpenTelemetryMiddleware(app)\n\n\nReferences\n----------\n\n* `OpenTelemetry Project <https://opentelemetry.io/>`_\n",
"bugtrack_url": null,
"license": null,
"summary": "Web util for OpenTelemetry",
"version": "0.56b0",
"project_urls": {
"Homepage": "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/util/opentelemetry-util-http",
"Repository": "https://github.com/open-telemetry/opentelemetry-python-contrib"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "05ca20763fba2af06e73f0e666e46a32b5cdb9d2d75dcb5fd221f50c818cae43",
"md5": "3d8473874a76a897b4ef911569302e02",
"sha256": "e26dd8c7f71da6806f1e65ac7cde189d389b8f152506146968f59b7a607dc8cf"
},
"downloads": -1,
"filename": "opentelemetry_util_http-0.56b0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3d8473874a76a897b4ef911569302e02",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 7645,
"upload_time": "2025-07-11T12:26:16",
"upload_time_iso_8601": "2025-07-11T12:26:16.106296Z",
"url": "https://files.pythonhosted.org/packages/05/ca/20763fba2af06e73f0e666e46a32b5cdb9d2d75dcb5fd221f50c818cae43/opentelemetry_util_http-0.56b0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cec580c603e44071d172d4e9c909b13e3d9924b90b08a581eff78a8daf77686e",
"md5": "8c0e2bad192db52f0d7934bdd90e38cd",
"sha256": "9a0c8573a68e3242a2d3e5840476088e63714e6d3e25f67127945ab0c7143074"
},
"downloads": -1,
"filename": "opentelemetry_util_http-0.56b0.tar.gz",
"has_sig": false,
"md5_digest": "8c0e2bad192db52f0d7934bdd90e38cd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 9404,
"upload_time": "2025-07-11T12:26:55",
"upload_time_iso_8601": "2025-07-11T12:26:55.365062Z",
"url": "https://files.pythonhosted.org/packages/ce/c5/80c603e44071d172d4e9c909b13e3d9924b90b08a581eff78a8daf77686e/opentelemetry_util_http-0.56b0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 12:26:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "open-telemetry",
"github_project": "opentelemetry-python-contrib",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "opentelemetry-util-http"
}