{"id":447,"library":"opentelemetry-util-http","title":"OpenTelemetry HTTP Utilities","description":"Provides HTTP-related utilities for OpenTelemetry instrumentation, currently at version 0.61b0, with a beta release cadence.","status":"active","version":"0.61b0","language":"python","source_language":"en","source_url":"https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-util-http","tags":["OpenTelemetry","HTTP","Instrumentation","Python"],"install":[{"cmd":"pip install opentelemetry-util-http","lang":"bash","label":"Install opentelemetry-util-http"}],"dependencies":[{"reason":"Provides the OpenTelemetry API for instrumentation.","package":"opentelemetry-api"},{"reason":"Provides the OpenTelemetry SDK for telemetry data processing.","package":"opentelemetry-sdk"}],"imports":[{"wrong":"from opentelemetry.instrumentation.httpx import HttpInstrumentation","symbol":"HttpInstrumentation","correct":"from opentelemetry.instrumentation.httpx import HttpInstrumentation"}],"quickstart":{"code":"import os\nfrom opentelemetry.instrumentation.httpx import HttpInstrumentation\n\n# Initialize the HTTPX instrumentation\nhttpx_instrumentor = HttpInstrumentation()\nhttpx_instrumentor.enable()\n\n# Your application code here\n# For example, making an HTTP request using httpx\nimport httpx\n\nclient = httpx.Client()\nresponse = client.get('http://example.com')\nprint(response.status_code)\n\n# Disable the instrumentation when done\nhttpx_instrumentor.disable()","lang":"python","description":"A basic example of using OpenTelemetry's HTTPX instrumentation to monitor HTTP requests."},"warnings":[{"fix":"Update your instrumentation and observability tools to handle the new attribute names 'url.path' and 'url.query'.","message":"The 'http.target' attribute has been split into 'url.path' and 'url.query' as part of the stabilization of HTTP Semantic Conventions. Ensure your instrumentation and observability tools are updated accordingly.","severity":"breaking","affected_versions":">=0.61b0"},{"fix":"Replace instances of 'http.client_ip' with 'client.address' in your codebase.","message":"The 'http.client_ip' attribute has been replaced with 'client.address' in the latest semantic conventions. Update your code to use 'client.address' for client IP information.","severity":"deprecated","affected_versions":">=0.61b0"},{"fix":"Install the required OpenTelemetry packages using pip: `pip install opentelemetry-api opentelemetry-sdk opentelemetry-instrumentation-httpx`.","message":"The OpenTelemetry instrumentation module could not be found. This typically means the necessary OpenTelemetry packages (e.g., opentelemetry-api, opentelemetry-sdk, and specific instrumentation packages like opentelemetry-instrumentation-httpx) are not installed in the environment.","severity":"breaking","affected_versions":">=0.61b0"},{"fix":"Ensure that the necessary OpenTelemetry packages are installed. For example, run 'pip install opentelemetry-sdk opentelemetry-instrumentation-httpx'.","message":"The 'opentelemetry.instrumentation' module was not found. This typically indicates that required OpenTelemetry packages, such as 'opentelemetry-sdk' or specific instrumentation packages like 'opentelemetry-instrumentation-httpx', are not installed in the environment.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'0.61':15 'b0':16 'beta':19 'cadenc':21 'current':12 'http':2,6,23 'http-relat':5 'instrument':11,24 'opentelemetri':1,10,22 'provid':4 'python':25 'relat':7 'releas':20 'util':3,8 'version':14","created_at":"2026-03-28T12:02:59.246872+00:00","updated_at":"2026-04-16T17:46:35.636107+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'opentelemetry.instrumentation'"},"ecosystem":"pypi","meta_description":null,"install_score":0,"quickstart_score":0,"quickstart_tag":"stale","pypi_latest":"0.65b0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/open-telemetry/opentelemetry-python-contrib","docs":null,"changelog":null,"pypi":"https://pypi.org/project/opentelemetry-util-http/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["observability","http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-08-27","next_check":"2026-07-10","install_tag":"stale"}}