-
Notifications
You must be signed in to change notification settings - Fork 684
WSGI request spans don't have both http.target
and http.url
attributes
#2156
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
Comments
Hi @xrmx, regarding this issue, shall I add http_url for only new semconv as below PR's changes for asgi http_url? Makes changes locally and the span is like below. Please review and if this makes sense I will create PR with changes, thanks. |
@qiuge615 In that case, the PR is removing the |
@emdneto Thanks for your help, url.full is not required in new semantic conventions. One question is regarding the old version of semantic conventions, http.url is required, as below doc, does that make sense to add it in old version of semantic conventions? |
@qiuge615 |
@emdneto well received, thank your for your explanations. |
So... The ASGI adding the |
@Kludex the attribute isn't wrong. it's redundant for server spans in the new version of semconv (so, it is unnecessary to have it) |
Steps to reproduce
Example code:
Then visit http://localhost:5000/hello
What is the expected behavior?
('/hello', 'http://localhost:5000/hello')
What is the actual behavior?
('/hello', None)
Additional context
The current code looks like this:
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py
Lines 320 to 325 in 47caeab
The first commit of the file shows essentially the same:
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py
Lines 108 to 111 in d19b464
I don't know under what circumstances the target is missing and the full URL is present instead, but I don't understand why only one or the other is included instead of both.
By comparison, the ASGI instrumentation happily includes both:
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
Lines 311 to 312 in 47caeab
The text was updated successfully, but these errors were encountered: