feat(spring): [Cache Tracing 10] Port cache tracing to Spring Boot 2 + samples#5191
Draft
adinauer wants to merge 3 commits intofeat/cache-tracing-spring-boot-3from
Draft
feat(spring): [Cache Tracing 10] Port cache tracing to Spring Boot 2 + samples#5191adinauer wants to merge 3 commits intofeat/cache-tracing-spring-boot-3from
adinauer wants to merge 3 commits intofeat/cache-tracing-spring-boot-3from
Conversation
Port cache tracing instrumentation from sentry-spring-jakarta to sentry-spring for Spring Boot 2 users. Adds SentryCacheWrapper, SentryCacheManagerWrapper, and SentryCacheBeanPostProcessor in the io.sentry.spring.cache package. Wires auto-configuration in sentry-spring-boot via sentry.enable-cache-tracing=true property. The retrieve() methods are omitted since Spring 5 does not have them (they were added in Spring 6.1). Co-Authored-By: Claude <noreply@anthropic.com>
Add CacheController, TodoService with @Cacheable/@CachePut/@CacheEvict annotations, and CacheSystemTest e2e tests to the sentry-samples-spring-boot sample. Enables cache tracing with Caffeine as the cache provider. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Core
Spring
Other
Bug Fixes 🐛
🤖 This preview updates automatically when you update the PR. |
Contributor
|
This was referenced Mar 13, 2026
Draft
Sentry Build Distribution
|
Contributor
Performance metrics 🚀
|
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Cache Tracing)
📜 Description
Port cache tracing classes from
sentry-spring-jakartatosentry-spring(Spring Boot 2 / Spring Framework 5), including:SentryCacheWrapper,SentryCacheManagerWrapper,SentryCacheBeanPostProcessorinio.sentry.spring.cachesentry-spring-boot'sSentryAutoConfigurationretrieve()methods omitted — Spring 5 does not have them (added in Spring 6.1)Also adds cache tracing sample and e2e tests to
sentry-samples-spring-boot:CacheController,TodoServicewith@Cacheable/@CachePut/@CacheEvictCacheSystemTeste2e tests💡 Motivation and Context
Spring Boot 2 is still widely used in production. Without this port, the majority of Spring users would not have access to cache tracing instrumentation.
💚 How did you test it?
./gradlew :sentry-spring:test --tests="*cache*"— all 13 pass./gradlew :sentry-spring:compileJava :sentry-spring-boot:compileJava :sentry-samples:sentry-samples-spring-boot:compileJava :sentry-samples:sentry-samples-spring-boot:compileTestKotlin./gradlew apiDump📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None — this completes the Spring Boot 2 port. All three Spring Boot versions (2, 3, 4) now have cache tracing support.