-
Notifications
You must be signed in to change notification settings - Fork 830
refactor(asgi): replace HTTP_SERVER_NAME SpanAttribute with semconv attribute #4039
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
base: main
Are you sure you want to change the base?
Conversation
|
|
xrmx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are a lot more users of SpanAttributes in the asgi package
|
|
||
| from asgiref.compatibility import guarantee_single_callable | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if http_host_value_list: | ||
| if _report_old(sem_conv_opt_in_mode): | ||
| result[SpanAttributes.HTTP_SERVER_NAME] = ",".join( | ||
| result[HTTP_SERVER_NAME] = ",".join( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| result[HTTP_SERVER_NAME] = ",".join( | |
| result[HTTP_SERVER_NAME] = ",".join( |
Looks like you haven't setup precommit as written in CONTRIBUTING
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out.
I intentionally limited the scope of this PR to the HTTP_SERVER_NAME usage to keep the change small and aligned with the guidance in #3475, and to avoid changing telemetry output.
I’ve also set up and run the pre-commit hooks locally as described in CONTRIBUTING, and amended the commit accordingly.
Happy to follow up with additional SpanAttributes replacements in a separate PR if that would be useful.
Refs #3475
Type of change
How Has This Been Tested?
This change updates a semantic convention attribute constant without modifying
runtime behavior. Local test execution on Windows is limited by environment
constraints; CI will validate the change.
Does This PR Require a Core Repo Change?
Checklist: