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

Initialize Logback after context refreshes. #1129

Merged
merged 5 commits into from
Dec 22, 2020
Merged

Initialize Logback after context refreshes. #1129

merged 5 commits into from
Dec 22, 2020

Conversation

maciejwalkowiak
Copy link
Contributor

📜 Description

Spring Context can be refreshed while application is running (for example using Spring Cloud Bus). Without this change, SentryAppender would not get registered once refresh happens.

💡 Motivation and Context

#1128

💚 How did you test it?

AFAIK It is not possible to trigger context refresh in Spring integration testing framework.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing
  • No breaking changes

@codecov-io
Copy link

codecov-io commented Dec 21, 2020

Codecov Report

Merging #1129 (270d561) into main (671f9e0) will increase coverage by 0.86%.
The diff coverage is 96.42%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1129      +/-   ##
============================================
+ Coverage     74.34%   75.21%   +0.86%     
- Complexity     1592     1603      +11     
============================================
  Files           163      165       +2     
  Lines          5617     5567      -50     
  Branches        574      547      -27     
============================================
+ Hits           4176     4187      +11     
+ Misses         1164     1128      -36     
+ Partials        277      252      -25     
Impacted Files Coverage Δ Complexity Δ
...o/sentry/spring/boot/SentryLogbackInitializer.java 96.15% <96.15%> (ø) 10.00 <10.00> (?)
...g/boot/SentryLogbackAppenderAutoConfiguration.java 100.00% <100.00%> (ø) 2.00 <2.00> (-6.00)
sentry/src/main/java/io/sentry/Stack.java 92.10% <0.00%> (ø) 8.00% <0.00%> (?%)
sentry/src/main/java/io/sentry/Hub.java 75.22% <0.00%> (+9.90%) 70.00% <0.00%> (-1.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 671f9e0...48aa137. Read the comment docs.

@marandaneto
Copy link
Contributor

should we add a changelog? if it fixes a bug, I'd say it's worth it.

Copy link
Contributor

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maciejwalkowiak maciejwalkowiak merged commit cbbcd27 into main Dec 22, 2020
@maciejwalkowiak maciejwalkowiak deleted the gh-1128 branch December 22, 2020 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants