-
Notifications
You must be signed in to change notification settings - Fork 534
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
Express instrumentation 0.33.0 breaks handling http_route metric attribute #1618
Comments
seems to be caused by #1557. @chigia001 Any hints if there is a easy fix possible? |
It might also related to #1615 |
I think droping the check for
The old logic is a bit inconsistent between rpcMetadata.route and span name. And I pick a more strict logic 😢 |
I don't think it's related to #1615 because the I ran above reproducer with debugger attached and everytime the instrumentation is called I saw |
it's not related to using a If I replace |
MY bad, different issue. Let me create PR with additional test. |
Maybe setting the route should be even moved down below the |
@chigia001 would you mind if I assign you to this issue? 🙂 |
@pichlermarc Yes, I already have a PR for this. |
What version of OpenTelemetry are you using?
What version of Node are you using?
What did you do?
I'm using instrumentation-express to have the
http_route
attribute added to metrics. Not using traces, just metrics with Prometheus exporter.It is working with
"@opentelemetry/instrumentation-express": "0.32.4"
, getting this output when scraping metrics:It is no more working upgrading
"@opentelemetry/instrumentation-express": "0.33.0"
.What did you expect to see?
The
http_route
attribute inhttp_server_duration_*
metric.What did you see instead?
The
http_route
attribute is not present inhttp_server_duration_*
metric.Additional context
Use this sample code to reproduce:
package.json
simple-monitoring.js
simple-express.js
Run:
npm install
./simple-express.js
, which will start the simple express server exposing the/hello
routecurl -s -X GET "http://localhost:6900/hello"
in a separate shellhttp://localhost:9464/metrics
and verify the output I've pasted in the previous sections. You should get thehttp_route
attribute when using the0.32.4
version, while you should not when upgrading to0.33.0
.The text was updated successfully, but these errors were encountered: