Skip to content

ASGI instrumentation metrics don't align with the semantic conventions #3310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
liinie opened this issue Feb 28, 2025 · 0 comments
Open

ASGI instrumentation metrics don't align with the semantic conventions #3310

liinie opened this issue Feb 28, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@liinie
Copy link

liinie commented Feb 28, 2025

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 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.

Steps to Reproduce

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

@liinie liinie added the bug Something isn't working label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant