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

proposal: contrib/gofiber/fiber.v2: improve error handling #978

Closed
dubonzi opened this issue Aug 13, 2021 · 2 comments · Fixed by #988
Closed

proposal: contrib/gofiber/fiber.v2: improve error handling #978

dubonzi opened this issue Aug 13, 2021 · 2 comments · Fixed by #988
Labels
proposal/accepted Accepted proposals proposal more in depth change that requires full team approval

Comments

@dubonzi
Copy link
Contributor

dubonzi commented Aug 13, 2021

Right now the fiber integration doesn't set the error information on the spans, like it's done for echo. Instead of seeing the actual error info, the span is only marked with a status code error. Is there some specific reason for it or could it be improved? I'd be happy to work on a PR if possible :)

Echo: https://github.com/DataDog/dd-trace-go/blob/v1/contrib/labstack/echo.v4/echotrace.go#L55
Fiber: https://github.com/DataDog/dd-trace-go/blob/v1/contrib/gofiber/fiber.v2/fiber.go#L69

@knusbaum
Copy link
Contributor

knusbaum commented Aug 20, 2021

@dubonzi
I don't see a reason why we shouldn't be capturing the error from the Next call here:

Will that work for your use case?
If you would like to put up a PR for that we'd be happy to review it.

@knusbaum knusbaum changed the title contrib/gofiber/fiber.v2: improve error handling proposal: contrib/gofiber/fiber.v2: improve error handling Aug 20, 2021
@knusbaum knusbaum added proposal more in depth change that requires full team approval proposal/accepted Accepted proposals labels Aug 20, 2021
@dubonzi
Copy link
Contributor Author

dubonzi commented Aug 20, 2021

Thanks for taking a look @knusbaum!

Will that work for your use case?

It will! I'll open a PR soon for it.

dubonzi added a commit to dubonzi/dd-trace-go that referenced this issue Aug 21, 2021
The error returned from the fiber handler was being ignored
by the middleware. It now correctly captures the error and
sets it on the span.

Fixes DataDog#978
knusbaum pushed a commit that referenced this issue Aug 30, 2021
The error returned from the fiber handler was being ignored
by the middleware. It now correctly captures the error and
sets it on the span.

Fixes #978
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal/accepted Accepted proposals proposal more in depth change that requires full team approval
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants