Skip to content
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

route span is missing when route throws an error in hapi instrumentation #572

Closed
CptSchnitz opened this issue Jul 13, 2021 · 4 comments · Fixed by #589
Closed

route span is missing when route throws an error in hapi instrumentation #572

CptSchnitz opened this issue Jul 13, 2021 · 4 comments · Fixed by #589
Assignees
Labels
bug Something isn't working

Comments

@CptSchnitz
Copy link
Contributor

What version of OpenTelemetry are you using?

api - 1.0.1
core - 0.23.0
contrib - 0.23.0

What version of Node are you using?

v12.20.0

What did you do?

I created a simple hapi server based on the example that only throws errors.
I made a few requests to it's endpoints, one throws a normal error, and the other using boom.
the server can be found here:
https://github.com/CptSchnitz/instrumented-hapi-with-errors

What did you expect to see?

I expected to see the route span with its status set on error.

What did you see instead?

the route span is missing.
image

Additional context

I would happy to work on fixing this once you confirm its an actual bug.

@CptSchnitz CptSchnitz added the bug Something isn't working label Jul 13, 2021
@CptSchnitz
Copy link
Contributor Author

@vmarchaud the pull request you linked wont solve this, it only handles the route name.
I can add error handling to the it, or open a new PR.

@vmarchaud
Copy link
Member

@CptSchnitz Sorry i though i was on the other issue ahah, thanks for the heads up

@CptSchnitz
Copy link
Contributor Author

I started working on the issue and I got a question about implementation.
Hapi uses errors thrown by Boom to set status codes.
Do I need to set the span status to error (according to the HTTP semantic convention) and record the exception, or if the error is created by boom I shouldn't record the exception?

@vmarchaud
Copy link
Member

Do I need to set the span status to error (according to the HTTP semantic convention) and record the exception, or if the error is created by boom I shouldn't record the exception?

I guess if you can thats better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants