-
Notifications
You must be signed in to change notification settings - Fork 0
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
log 5** exceptions to sentry #58
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple questions for my understanding, but looks good
if (sentryConfiguration.dsn().isEmpty()) { | ||
logger.info("No Sentry DSN found. Starting up without it."); | ||
} else { | ||
logger.info("Sentry DSN found. 5xx errors will be sent to Sentry."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, i really like these logs.
@@ -128,9 +129,14 @@ public ResponseEntity<ApiErrorReport> catchallHandler(Exception ex) { | |||
|
|||
private ResponseEntity<ApiErrorReport> buildApiErrorReport( | |||
@NotNull Throwable ex, HttpStatus statusCode, List<String> causes) { | |||
// only logging 5** errors to sentry, should we log more/every error? Other services seem to do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we can probably remove the question here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup yup this was for you to see it :). will remove
@@ -11,7 +11,9 @@ | |||
@SpringBootTest( | |||
properties = { | |||
"spring.main.lazy-initialization=true", | |||
"datasource.testWithEmbeddedDatabase=false" | |||
"datasource.testWithEmbeddedDatabase=false", | |||
"pipelines.sentry.dsn=" // piggyback on this test which already supplies properties to test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can chat about this - how did you decide on this test class to add this to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just chose a test that overwrote some properties in the test assplication.conf. I didnt feel like it was worth creating a whole new class to test this (i would rather remove it and not test than do that).
@@ -48,3 +48,6 @@ cbas: | |||
pipelines: | |||
ingress: | |||
domainName: "some-tsps-domain.com" | |||
sentry: | |||
dsn: https://public@sentry.example.com/1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do these get used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they get used when sentry is instantiated i.e. it has to look like this pattern otherwise it'll throw an exception
Quality Gate passedIssues Measures |
Description
To satisy the requirement for Production Readiness section M8, we need to send our exceptions to sentry for monitoring puproses. The work was already done to set up our dashboard and make sentry available to us. This PR introduces sentry to the service and logs all 5** exceptions we generate to sentry for monitoring
This change has to go along with https://github.com/broadinstitute/terra-helmfile/pull/5103
Jira Ticket
https://broadworkbench.atlassian.net/browse/TSPS-172