Include unique ID in 500 responses and link to Datadog trace #6022
andrew222651
started this conversation in
Show and tell
Replies: 1 comment
-
|
With current Starlette (v0.26), remove |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Logging tools like Datadog or Sentry can record unhandled exceptions that lead to HTTP 500 responses, but what if a user receives a 500 response and you want to look up the log entry corresponding to that specific request? The following code adds a
x-error-idheader to 500 responses for unhandled exceptions. The value is a unique ID which is also saved as a tag associated with the trace in Datadog.Beta Was this translation helpful? Give feedback.
All reactions