feat(samples): [Cache Tracing 6] Add JCache console sample#5182
Open
adinauer wants to merge 5 commits intofeat/cache-tracing-jcachefrom
Open
feat(samples): [Cache Tracing 6] Add JCache console sample#5182adinauer wants to merge 5 commits intofeat/cache-tracing-jcachefrom
adinauer wants to merge 5 commits intofeat/cache-tracing-jcachefrom
Conversation
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. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Contributor
|
This was referenced Mar 10, 2026
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bff862e | 315.13 ms | 364.41 ms | 49.28 ms |
| 10c6fa4 | 308.73 ms | 384.38 ms | 75.66 ms |
| 290c35b | 320.64 ms | 355.09 ms | 34.45 ms |
| c3caf85 | 313.96 ms | 352.98 ms | 39.02 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bff862e | 0 B | 0 B | 0 B |
| 10c6fa4 | 0 B | 0 B | 0 B |
| 290c35b | 0 B | 0 B | 0 B |
| c3caf85 | 0 B | 0 B | 0 B |
Sentry Build Distribution
|
Sentry Build Distribution
|
Sentry Build Distribution
|
Sentry Build Distribution
|
Sentry Build Distribution
|
8 tasks
sentry-samples/sentry-samples-console/src/main/java/io/sentry/samples/console/Main.java
Show resolved
Hide resolved
Member
Author
|
@sentry review |
Member
Author
|
cursor review |
Draft
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
Adds a JCache (JSR-107) cache tracing demonstration to the console sample app. Shows how to manually wrap a JCache
CachewithSentryJCacheWrapperto createcache.get,cache.put,cache.remove, andcache.flushspans as children of the active transaction.Changes:
caffeine-jcachedependency tolibs.versions.toml(Caffeine as the JCache provider for the sample)sentryJcache,jcache, andcaffeine-jcachedependencies to the console sampledemonstrateCacheTracing()method toMain.javademonstrating put, get (hit), get (miss), remove, and clear operations💡 Motivation and Context
Provides a working example of manual JCache cache tracing for developers who want to use
SentryJCacheWrapperdirectly without Spring auto-configuration.💚 How did you test it?
Ran the console sample locally and verified cache spans appear in the transaction.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
#skip-changelog