You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Sentry logs are not capturing parameters and stack traces effectively, making it difficult to debug issues. The implementation should be improved to properly pass parameters and stack traces to Sentry, following best practices outlined in the Sentry Go documentation.
Acceptance Criteria
GIVEN an error is logged WHEN the error is sent to Sentry THEN it should include all relevant parameters and a stack trace
GIVEN an error is logged WHEN the error is sent to Sentry THEN the error message should be structured and easy to parse in Sentry
GIVEN an error is logged WHEN the error is sent to Sentry THEN the stack trace should be captured and included in the Sentry event
GIVEN the application is running in production or staging WHEN an error occurs THEN the error should be logged to Sentry with the correct context and metadata
Tech Details
Sentry Configuration:
Update the Sentry initialization to include additional configuration options for better error handling.
Ensure stack traces are captured by enabling the AttachStacktrace option.
Logging Improvements:
Use Sentry's CaptureException or CaptureMessage methods to log errors with structured data.
Pass additional context (e.g., order ID, provider ID) as tags or extra data in Sentry events.
Stack Trace Handling:
Ensure stack traces are included in Sentry events by using WithScope or ConfigureScope.
Error Wrapping:
Wrap errors with additional context to provide more detailed error messages.
Notes/Assumptions
The Sentry DSN and environment are already configured in the server configuration.
The application is already using logrus for logging, which is integrated with Sentry via the sentryhook.
Open Questions
The text was updated successfully, but these errors were encountered:
Description
Currently, Sentry logs are not capturing parameters and stack traces effectively, making it difficult to debug issues. The implementation should be improved to properly pass parameters and stack traces to Sentry, following best practices outlined in the Sentry Go documentation.
Acceptance Criteria
GIVEN an error is logged
WHEN the error is sent to Sentry
THEN it should include all relevant parameters and a stack trace
GIVEN an error is logged
WHEN the error is sent to Sentry
THEN the error message should be structured and easy to parse in Sentry
GIVEN an error is logged
WHEN the error is sent to Sentry
THEN the stack trace should be captured and included in the Sentry event
GIVEN the application is running in production or staging
WHEN an error occurs
THEN the error should be logged to Sentry with the correct context and metadata
Tech Details
Sentry Configuration:
AttachStacktrace
option.Logging Improvements:
CaptureException
orCaptureMessage
methods to log errors with structured data.Stack Trace Handling:
WithScope
orConfigureScope
.Error Wrapping:
Notes/Assumptions
logrus
for logging, which is integrated with Sentry via thesentryhook
.Open Questions
The text was updated successfully, but these errors were encountered: