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

fix: set error type and stack with universal instrumentation #170

Closed
wants to merge 1 commit into from

Conversation

dali546
Copy link
Contributor

@dali546 dali546 commented Apr 21, 2024

What does this PR do?

With Universal Instrumentation error message, type and stack aren't being sent to Datadog, resulting in poor experience in the APM

image

There is a small issue related to the source of the error, as well as the stacktrace of the error originating from inside the datadog library. Any help would be appreciated

Motivation

To see a fully working integration

Testing Guidelines

Created a simple lambda function that returns an error, with universal monitoring enabled.

Additional Notes

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Checklist

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog

@dali546 dali546 requested a review from a team as a code owner April 21, 2024 20:53
@dali546 dali546 force-pushed the patch-1 branch 2 times, most recently from 7b7fddd to b408429 Compare April 21, 2024 21:40
@purple4reina
Copy link
Contributor

Hey @dali546, thanks a ton for your contribution. I'm taking a look at it now.

@purple4reina
Copy link
Contributor

Based on these changes, a handler that returns an error used to look like

Screenshot 2024-04-24 at 3 30 55 PM

but now looks like

Screenshot 2024-04-24 at 3 31 21 PM

You can see, we now include the error type and stack trace.

Note that this PR does not implement error type and stack trace for functions that return status code 500 or those that panic.

@purple4reina
Copy link
Contributor

Thanks again for your contribution @dali546! All looks great. I'm going to add a few tests and then I'll merge it.

@dali546
Copy link
Contributor Author

dali546 commented Apr 24, 2024

Thank you @purple4reina , appreciate the review and support!

@purple4reina
Copy link
Contributor

Closing in favor of #171. I don't have access to add commits to this branch, so I created a new one.

@dali546 dali546 deleted the patch-1 branch April 25, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants