Skip to content

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

Merged
adinauer merged 2 commits intofeat/cache-tracingfrom
feat/cache-tracing-sample
Mar 9, 2026
Merged

feat(samples): [Cache Tracing 4] Add cache tracing e2e sample#5167
adinauer merged 2 commits intofeat/cache-tracingfrom
feat/cache-tracing-sample

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Mar 5, 2026

PR Stack (Cache Tracing)

  • #5162 — Add SentryCacheWrapper and SentryCacheManagerWrapper
  • #5163 — Add enableCacheTracing option
  • #5164 — Add BeanPostProcessor and auto-configuration
  • #5167 — Add cache tracing e2e sample

📜 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 5, 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 5, 2026

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

Generated by 🚫 dangerJS against b2dbb4d

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 351.37 ms 429.44 ms 78.07 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
b2b863f 338.62 ms 376.54 ms 37.92 ms
eeb463c 311.36 ms 371.79 ms 60.43 ms

App size

Revision Plain With Sentry Diff
b2b863f 0 B 0 B 0 B
eeb463c 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

@adinauer adinauer force-pushed the feat/cache-tracing-autoconfig branch from 7ba327c to 84f4889 Compare March 9, 2026 08:07
adinauer and others added 2 commits March 9, 2026 09:07
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 de2a701 to b2dbb4d Compare March 9, 2026 08:07
Base automatically changed from feat/cache-tracing-autoconfig to feat/cache-tracing March 9, 2026 08:07
@adinauer adinauer merged commit b2dbb4d into feat/cache-tracing Mar 9, 2026
50 of 54 checks passed
@adinauer adinauer deleted the feat/cache-tracing-sample branch March 9, 2026 08:07
@sentry
Copy link

sentry bot commented Mar 9, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.0 (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