Skip to content

feat(samples): [Cache Tracing 4] Add cache tracing e2e sample#5175

Draft
adinauer wants to merge 4 commits intofeat/cache-tracing-autoconfigfrom
feat/cache-tracing-sample
Draft

feat(samples): [Cache Tracing 4] Add cache tracing e2e sample#5175
adinauer wants to merge 4 commits intofeat/cache-tracing-autoconfigfrom
feat/cache-tracing-sample

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Mar 9, 2026

PR Stack (Cache Tracing)

  • #5172 — Add SentryCacheWrapper and SentryCacheManagerWrapper
  • #5173 — Add enableCacheTracing option
  • #5174 — Add BeanPostProcessor and auto-configuration
  • #5175 — Add cache tracing e2e sample
  • #5179 — Add SentryJCacheWrapper for JCache (JSR-107)

📜 Description

Adds an e2e sample and system test for cache tracing in the Spring Boot 4 sample app.

  • Enables @EnableCaching with Caffeine as the cache provider (in-memory, no external infrastructure needed)
  • Adds TodoService with @Cacheable, @CachePut, @CacheEvict annotations
  • Adds CacheController with REST endpoints (GET/POST/DELETE /cache/)
  • Adds RestTestClient methods for cache endpoints
  • Adds CacheSystemTest verifying cache.put, cache.get, and cache.remove spans

💡 Motivation and Context

Demonstrates the cache tracing feature end-to-end and provides system test coverage.

💚 How did you test it?

  • System test CacheSystemTest exercises all cache operations and asserts spans are received by the mock Sentry server

📝 Checklist

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • No breaking change or entry added to the changelog.

🔮 Next steps

None — this completes the cache tracing stack.

#skip-changelog

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 1afb20e

adinauer and others added 2 commits March 9, 2026 09:24
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>
@adinauer adinauer force-pushed the feat/cache-tracing-sample branch from b2dbb4d to cf3b325 Compare March 9, 2026 08:24
@sentry
Copy link

sentry bot commented Mar 9, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.0 (1) release

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 296.69 ms 397.28 ms 100.59 ms
Size 0 B 0 B 0 B

Baseline results on branch: feat/cache-tracing-autoconfig

Startup times

Revision Plain With Sentry Diff
ad651f5 362.86 ms 440.44 ms 77.57 ms
97c5869 356.91 ms 456.61 ms 99.70 ms
9071b35 318.77 ms 372.18 ms 53.41 ms

App size

Revision Plain With Sentry Diff
ad651f5 1.58 MiB 2.29 MiB 723.27 KiB
97c5869 0 B 0 B 0 B
9071b35 1.58 MiB 2.29 MiB 722.92 KiB

Previous results on branch: feat/cache-tracing-sample

Startup times

Revision Plain With Sentry Diff
0ceb700 305.81 ms 355.91 ms 50.10 ms
855766f 364.82 ms 427.16 ms 62.35 ms
eeb463c 311.36 ms 371.79 ms 60.43 ms
b2b863f 338.62 ms 376.54 ms 37.92 ms

App size

Revision Plain With Sentry Diff
0ceb700 0 B 0 B 0 B
855766f 0 B 0 B 0 B
eeb463c 0 B 0 B 0 B
b2b863f 0 B 0 B 0 B

@sentry
Copy link

sentry bot commented Mar 9, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.0 (1) release

@sentry
Copy link

sentry bot commented Mar 9, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.1 (1) release

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.

1 participant