[otelgin]: Catch and record panics in Middleware #5088
Labels
area: instrumentation
Related to an instrumentation package
enhancement
New feature or request
instrumentation: otelgin
Problem Statement
Today, the otelgin middleware does not handle panics. In the event that there's some bug in some service code or lower middleware layer that panics, this information is not present in the resulting span. It would be incredibly useful to leverage this information to help troubleshooting in development and production environments.
Proposed Solution
Catch, record, and "rethrow" any panics. This solution would likely look very similar to the
otelgin.HTML(...)
handler here.Alternatives
Prior Art
As mentioned above, we would likely leverage a similar solution used in the same package here.
Additional Context
N/A.
The text was updated successfully, but these errors were encountered: