Skip to content
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

Default to a blank dsn if sentry env vars are not set #4963

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

EWaterman
Copy link
Member

✨ Description of Change

A concise summary of what is being changed. Please provide enough context for reviewers to be able to understand the change and why it is necessary. If the issue/ticket already provides enough information, you can put "See ticket" as the description.

Link to GitHub issue or Jira ticket: N/A

Description: Currently we see the following warning during startup when local testing:

10:13:50,850 |-WARN in io.sentry.logback.SentryAppender[sentry] - Failed to init Sentry during appender initialization: DSN is required. Use empty string or set enabled to false in SentryOptions to disable SDK.

This also causes logback to dump a whole bunch of other debug logs.

The fix sets a default value of empty string (which disables Sentry) for the dsn if the SENTRY_DSN_BACKEND or SENTRY_DSN environment variables are not set.

@EWaterman EWaterman self-assigned this Nov 28, 2024
@github-actions github-actions bot added type: bug Addresses unintended behaviours of the app domain: backend Changes or discussions relating to the backend server flag: config change Hilights a pull request that contains a change to the app config labels Nov 28, 2024
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 7.61%. Comparing base (3c324bc) to head (1cb952b).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...use/monitoring/SentryServletContextListener.groovy 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             develop   #4963      +/-   ##
============================================
- Coverage       7.67%   7.61%   -0.06%     
+ Complexity       829     816      -13     
============================================
  Files            600     600              
  Lines          42275   42275              
  Branches       10276   10277       +1     
============================================
- Hits            3245    3221      -24     
- Misses         38556   38586      +30     
+ Partials         474     468       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EWaterman EWaterman merged commit 3dae0b9 into develop Nov 28, 2024
9 checks passed
@EWaterman EWaterman deleted the bug/sentry-warning-on-startup branch November 28, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: backend Changes or discussions relating to the backend server flag: config change Hilights a pull request that contains a change to the app config type: bug Addresses unintended behaviours of the app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant