-
Notifications
You must be signed in to change notification settings - Fork 713
refactor(flask): replace SpanAttributes with semconv attributes #3539
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?
refactor(flask): replace SpanAttributes with semconv attributes #3539
Conversation
Hi 👋 Just wanted to kindly follow up. This PR replaces deprecated All changes were tested locally and verified against the existing test suite. Please let me know if anything should be adjusted or improved — happy to iterate! Thanks for your time and for maintaining this project 🙏 |
…nto refactor-flask-spanattributes
@@ -273,12 +273,14 @@ def response_hook(span: Span, status: str, response_headers: List): | |||
) | |||
from opentelemetry.instrumentation.utils import _start_internal_or_server_span | |||
from opentelemetry.metrics import get_meter | |||
from opentelemetry.semconv.attributes.http_attributes import HTTP_ROUTE |
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 would keep using the stable one, no need to update the tests import to match
Description
This PR replaces deprecated usage of
SpanAttributes
with semantic convention attributes fromopentelemetry.semconv.attributes
in theopentelemetry-instrumentation-flask
package.These changes bring the Flask instrumentation module in line with current OpenTelemetry conventions and help modernize the codebase as part of the broader refactoring tracked in the issue below.
Refs #3475
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
pytest
forinstrumentation/opentelemetry-instrumentation-flask/tests/
SpanAttributes
remainDoes This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.