feat(spring-jakarta): [Cache Tracing 9] Port cache tracing to Spring Boot 3 + samples#5190
Draft
adinauer wants to merge 2 commits intofeat/cache-tracing-retrievefrom
Draft
feat(spring-jakarta): [Cache Tracing 9] Port cache tracing to Spring Boot 3 + samples#5190adinauer wants to merge 2 commits intofeat/cache-tracing-retrievefrom
adinauer wants to merge 2 commits intofeat/cache-tracing-retrievefrom
Conversation
Port cache tracing classes from sentry-spring-7 to sentry-spring-jakarta, covering Spring Boot 3 (Spring Framework 6.x) users. Includes SentryCacheWrapper, SentryCacheManagerWrapper, SentryCacheBeanPostProcessor, and auto-configuration in sentry-spring-boot-jakarta. The retrieve() overrides for CompletableFuture/reactive cache operations are included and safe on Spring 6.0 (where retrieve() doesn't exist on the Cache interface) — they're simply dead code, never called by the framework until Spring 6.1+. Co-Authored-By: Claude <noreply@anthropic.com>
Add CacheController, TodoService with @Cacheable/@CachePut/@CacheEvict, Caffeine cache config, and CacheSystemTest e2e tests to all four Jakarta sample modules: - sentry-samples-spring-boot-jakarta - sentry-samples-spring-boot-jakarta-opentelemetry - sentry-samples-spring-boot-jakarta-opentelemetry-noagent - sentry-samples-spring-boot-webflux-jakarta Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Mar 13, 2026
Contributor
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
This was referenced Mar 13, 2026
Contributor
|
Sentry Build Distribution
|
Contributor
Performance metrics 🚀
|
Member
Author
|
@sentry review |
Member
Author
|
cursor review |
sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/cache/SentryCacheWrapper.java
Show resolved
Hide resolved
This was referenced Mar 13, 2026
lbloder
reviewed
Mar 17, 2026
Collaborator
lbloder
left a comment
There was a problem hiding this comment.
Looks good, same question about a potentially missing testcase as in the previous pr
| } | ||
|
|
||
| @Test | ||
| fun `retrieve with loader sets error status when future completes exceptionally`() { |
Collaborator
There was a problem hiding this comment.
would the retrieve sets error status when delegate throws synchronously test also make sense here?
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-7tosentry-spring-jakarta(Spring Boot 3 / Spring Framework 6), including:SentryCacheWrapper,SentryCacheManagerWrapper,SentryCacheBeanPostProcessorinio.sentry.spring.jakarta.cachesentry-spring-boot-jakarta'sSentryAutoConfigurationretrieve()overrides for reactive/async cache operations (safe on Spring 6.0 as dead code)Also adds cache tracing samples and e2e tests to all 4 Spring Boot 3 sample modules:
sentry-samples-spring-boot-jakartasentry-samples-spring-boot-jakarta-opentelemetrysentry-samples-spring-boot-jakarta-opentelemetry-noagentsentry-samples-spring-boot-webflux-jakartaEach sample includes
CacheController,TodoServicewith@Cacheable/@CachePut/@CacheEvict, Caffeine config, andCacheSystemTest.💡 Motivation and Context
Spring Boot 3 is still the majority of production users. Without this port, cache tracing would only be available on Spring Boot 4.
💚 How did you test it?
./gradlew :sentry-spring-jakarta:test --tests="io.sentry.spring.jakarta.cache.*"spotlessApply, API dump regenerated📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None — this completes the Spring Boot 3 port for cache tracing.
#skip-changelog