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

Simplify Spring integration #1188

Merged
merged 16 commits into from
Jan 21, 2021
Merged

Simplify Spring integration #1188

merged 16 commits into from
Jan 21, 2021

Conversation

maciejwalkowiak
Copy link
Contributor

@maciejwalkowiak maciejwalkowiak commented Jan 20, 2021

📜 Description

Simplify using Sentry error reporting and Sentry Performance feature in Spring (non-boot) integration. Also, change the sample project for Spring integration into traditional WAR application.

💡 Motivation and Context

Sentry Spring integration was working well with embedded servlet containers scenarios but appeared to be difficult to configure when used in traditional WAR deployment.

Also, fixed: #1187

💚 How did you test it?

Unit & Integration tests.

📝 Checklist

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

🔮 Next steps

Since there is a method IHub#getOptions there is a potential to move some bits of sentry-spring to sentry-servlet.

@codecov-io
Copy link

codecov-io commented Jan 20, 2021

Codecov Report

Merging #1188 (7a7f95a) into main (9c6af50) will decrease coverage by 0.06%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1188      +/-   ##
============================================
- Coverage     74.70%   74.64%   -0.07%     
- Complexity     1662     1670       +8     
============================================
  Files           174      176       +2     
  Lines          5851     5872      +21     
  Branches        572      572              
============================================
+ Hits           4371     4383      +12     
- Misses         1216     1225       +9     
  Partials        264      264              
Impacted Files Coverage Δ Complexity Δ
...pring/SentrySpringServletContainerInitializer.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../java/io/sentry/spring/SentryWebConfiguration.java 100.00% <ø> (ø) 2.00 <0.00> (-2.00)
sentry/src/main/java/io/sentry/Hub.java 75.22% <0.00%> (-0.23%) 75.00 <0.00> (ø)
sentry/src/main/java/io/sentry/HubAdapter.java 8.47% <0.00%> (-0.15%) 4.00 <0.00> (ø)
sentry/src/main/java/io/sentry/IHub.java 80.00% <ø> (ø) 8.00 <0.00> (ø)
sentry/src/main/java/io/sentry/NoOpHub.java 56.75% <0.00%> (-1.58%) 21.00 <0.00> (ø)
sentry/src/main/java/io/sentry/Stack.java 89.74% <0.00%> (-2.37%) 8.00 <0.00> (ø)
.../io/sentry/spring/tracing/SentryTracingFilter.java 80.55% <50.00%> (-4.30%) 5.00 <1.00> (+1.00) ⬇️
...io/sentry/spring/boot/SentryAutoConfiguration.java 94.11% <100.00%> (+0.24%) 1.00 <0.00> (ø)
...n/java/io/sentry/spring/SentryRequestResolver.java 95.23% <100.00%> (ø) 9.00 <1.00> (ø)
... and 4 more

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 9c6af50...7a7f95a. Read the comment docs.

@maciejwalkowiak maciejwalkowiak marked this pull request as ready for review January 20, 2021 14:04
@marandaneto
Copy link
Contributor

for Spring integration into traditional WAR application.

don't make Wars make Jars cc @bruno-garcia haha

@maciejwalkowiak maciejwalkowiak merged commit fc69ce7 into main Jan 21, 2021
@maciejwalkowiak maciejwalkowiak deleted the performance-spring-non-boot branch January 21, 2021 11:08
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.

SentrySpringRequestListener is not added as a listener on the ServletContext
3 participants