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
BTW, this PR comment requested removing name_callback which would have allowed customising the span name myself to work around this issue, but I don't see the reasoning behind this.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
FlaskInstrumentor
Example code:
Then open in your browser:
Note that the second request has the right general pattern but fails to match a route purely because
foobar
can't be converted to an integer.What is the expected behavior?
What is the actual behavior?
The first
GET
is missing:Additional context
The reason for this is clearly visible in the code. Requests with a matching Flask route don't have the HTTP method included:
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py
Lines 295 to 300 in 47caeab
But if they don't match, they fallback to the WSGI span name which includes the method:
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py
Lines 451 to 466 in 47caeab
BTW, this PR comment requested removing
name_callback
which would have allowed customising the span name myself to work around this issue, but I don't see the reasoning behind this.The text was updated successfully, but these errors were encountered: