Conversation
…eManagerWrapper Co-Authored-By: Claude Opus 4.6 <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 ✨
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Contributor
|
…tion - Use cache key as span description instead of cache name, matching the spec and other SDKs (Python, JavaScript) - Skip instrumentation for putIfAbsent since we cannot know if a write actually occurred; override to bypass default get()+put() delegation - Wrap valueLoader Callable in get(key, Callable) to detect cache hit/miss instead of always reporting hit=true - Update tests to match new behavior Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…uration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sentry Build Distribution
|
b2dbb4d to
7735a81
Compare
Sentry Build Distribution
|
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use Caffeine as the cache provider instead of a plain ConcurrentMapCacheManager. Spring Boot auto-configures CaffeineCacheManager when Caffeine is on the classpath, so the explicit CacheManager bean is no longer needed. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 27d7cf8 | 314.17 ms | 347.00 ms | 32.83 ms |
| ff8eea4 | 313.42 ms | 337.08 ms | 23.66 ms |
| b750b96 | 408.98 ms | 480.32 ms | 71.34 ms |
| 0eaac1e | 322.53 ms | 389.31 ms | 66.78 ms |
| 18c0bc2 | 306.73 ms | 349.77 ms | 43.03 ms |
| abf451a | 332.82 ms | 403.67 ms | 70.85 ms |
| 62b579c | 349.26 ms | 426.26 ms | 77.00 ms |
| f064536 | 335.52 ms | 408.79 ms | 73.27 ms |
| 70118e9 | 380.00 ms | 475.72 ms | 95.72 ms |
| 85d7417 | 347.21 ms | 394.35 ms | 47.15 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 27d7cf8 | 1.58 MiB | 2.12 MiB | 549.42 KiB |
| ff8eea4 | 1.58 MiB | 2.28 MiB | 718.64 KiB |
| b750b96 | 1.58 MiB | 2.10 MiB | 533.19 KiB |
| 0eaac1e | 1.58 MiB | 2.19 MiB | 619.17 KiB |
| 18c0bc2 | 1.58 MiB | 2.13 MiB | 557.33 KiB |
| abf451a | 1.58 MiB | 2.20 MiB | 635.29 KiB |
| 62b579c | 0 B | 0 B | 0 B |
| f064536 | 1.58 MiB | 2.20 MiB | 633.90 KiB |
| 70118e9 | 1.58 MiB | 2.29 MiB | 719.84 KiB |
| 85d7417 | 1.58 MiB | 2.10 MiB | 533.44 KiB |
Sentry Build Distribution
|
Like putIfAbsent, these are conditional writes that may be no-ops. Emitting a cache.put span for them would be misleading.
startChild can return a NoOp span (e.g. when span limit is reached). Skip instrumentation in that case to avoid unnecessary work.
removeAll() with no args removes all entries, which is semantically equivalent to clear(). Use cache.flush instead of cache.remove. The keyed removeAll(Set) remains cache.remove.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(spring7): [Cache Tracing 8] Add retrieve() overrides for reactive/async cache support
feat(spring-jakarta): [Cache Tracing 9] Port cache tracing to Spring Boot 3 + samples
feat(spring): [Cache Tracing 10] Port cache tracing to Spring Boot 2 + samples
fix(spring): [Cache Tracing 11] Skip cache span data when child span is NoOp
…on-name feat(spring): [Cache Tracing 12] Add db.operation.name attribute to cache spans
…-conditional-ops feat(spring): [Cache Tracing 13] Instrument putIfAbsent, replace, and getAndReplace
…it-detection fix(spring): [Cache Tracing 14] Fix cache hit detection for typed get and fix jcache docs link
…ific-ops ref(spring): [Cache Tracing 15] Use method-specific span operations for cache spans
…span-helpers ref(jcache): [Cache Tracing 16] Merge startSpan helpers into shared core method
…tion-key ref(cache): [Cache Tracing 17] Move operation attribute to centralized CACHE_OPERATION_KEY
feat(cache): [Cache Tracing 18] Add cache.write boolean span attribute
…-description fix(jcache): [Cache Tracing 19] Use comma-joined keys as span description for bulk operations
…tants ref(cache): [Cache Tracing 20] Remove _KEY suffix from cache SpanDataConvention constants
…ouble-call fix(spring): [Cache Tracing 21] Fix get(key, type) double-call in SentryCacheWrapper
…m-test fix(samples): [Cache Tracing 22] Fix cache evict system test to match actual span op
…w-changes test(cache): [Cache Tracing 23] Add missing cache key assertions and use exact equals
Member
Author
|
@sentry review |
Member
Author
|
cursor review |
adinauer
commented
Mar 23, 2026
CHANGELOG.md
Outdated
|
|
||
| ### Features | ||
|
|
||
| - Add cache tracing instrumentation for Spring Boot 2, 3, and 4 ([#5172](https://github.com/getsentry/sentry-java/pull/5172), [#5173](https://github.com/getsentry/sentry-java/pull/5173), [#5174](https://github.com/getsentry/sentry-java/pull/5174), [#5190](https://github.com/getsentry/sentry-java/pull/5190), [#5191](https://github.com/getsentry/sentry-java/pull/5191)) |
Member
Author
There was a problem hiding this comment.
Update changelog entries to this PR
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)
Collection PR for the Cache Tracing stack. Squash-merge this once all stack PRs are merged.
📜 Description
Adds auto-instrumentation for Spring's
Cacheabstraction, producingcache.get,cache.put,cache.remove, andcache.flushspans per the Sentry cache module spec.💡 Motivation and Context
Closes #4120
💚 How did you test it?
See individual PRs for test details.
📝 Checklist
sendDefaultPIIis enabled.