You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the _set_http_net_host method is implemented in _semconv.py to align with Semantic Conventions (v1.30.0), enabling the extraction of server.address in opt_in mode (see semconv doc) for the http.server.request.duration metric. However, this method is never imported in the ASGI instrumentation package (see instrumentation/asgi/init.py), making the server.address attribute unavailable.
Please fix this issue or provide a workaround to extract the http server name when using http.server.request.duration metric for ASGI instrumentation.
Describe your environment
OS: (Linux, MacOS)
Python version: (Python 3.8)
Package version: (0.50b0, 0.51b0)
What happened?
the
_set_http_net_host
method is implemented in _semconv.py to align with Semantic Conventions (v1.30.0), enabling the extraction ofserver.address
in opt_in mode (see semconv doc) for thehttp.server.request.duration
metric. However, this method is never imported in the ASGI instrumentation package (see instrumentation/asgi/init.py), making theserver.address
attribute unavailable.Please fix this issue or provide a workaround to extract the http server name when using http.server.request.duration metric for ASGI instrumentation.
Steps to Reproduce
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
Line 219 in 139f3e5
the _set_http_net_host could be added here
Expected Result
server.address is enabled for http.server.request.duration
Actual Result
server.address doesn't work even in opt-in mode
Additional context
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: