The SDK has two issues exception mechanisms:
- mechanism type is always
generic. According to the spec, type must be non-generic for SDK captures, but we currently don't have a way to distinguish between the two.
- No real API to pass mechanism to the exception.
Proposed Solution
Add a functional option ExceptionOption to CaptureException, Recover, and RecoverWithContext on both Hub and Client, so that we can inject WithMechanism:
hub.CaptureException(err, sentry.WithMechanism(&sentry.Mechanism{
Type: "auto.http.go.gin.middleware",
Handled: false,
}))
The SDK has two issues exception mechanisms:
generic. According to the spec, type must be non-generic for SDK captures, but we currently don't have a way to distinguish between the two.Proposed Solution
Add a functional option
ExceptionOptiontoCaptureException,Recover, andRecoverWithContexton both Hub and Client, so that we can injectWithMechanism: