Skip to content

feat(samples): [Cache Tracing 7] Add cache tracing to all Spring Boot 4 samples#5183

Open
adinauer wants to merge 3 commits intofeat/cache-tracing-console-samplefrom
feat/cache-tracing-all-samples
Open

feat(samples): [Cache Tracing 7] Add cache tracing to all Spring Boot 4 samples#5183
adinauer wants to merge 3 commits intofeat/cache-tracing-console-samplefrom
feat/cache-tracing-all-samples

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Mar 10, 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)
  • #5182 — Add JCache console sample
  • #5183 — Add cache tracing to all Spring Boot 4 samples
  • #5184 — Add retrieve() overrides for reactive/async cache support

📜 Description

Adds cache tracing support to all remaining Spring Boot 4 sample applications:

  • sentry-samples-spring-boot-4-opentelemetry
  • sentry-samples-spring-boot-4-otlp
  • sentry-samples-spring-boot-4-webflux

For each sample: adds @EnableCaching, Caffeine cache dependencies, TodoService with @Cacheable/@CachePut/@CacheEvict, CacheController REST endpoints, application.properties config, and CacheSystemTest e2e tests.

💡 Motivation and Context

PR #5175 added cache tracing to the base Spring Boot 4 sample only. This extends coverage to all other Spring Boot 4 sample variants so cache tracing is exercised across OTel, OTLP, and WebFlux configurations.

💚 How did you test it?

  • All three samples compile successfully
  • Each sample includes a CacheSystemTest with e2e tests for cache.put, cache.get, and cache.remove spans

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

#skip-changelog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 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 10, 2026

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

Generated by 🚫 dangerJS against dbb2998

@sentry
Copy link

sentry bot commented Mar 10, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.1 (1) release

@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 387.47 ms 483.14 ms 95.67 ms
Size 0 B 0 B 0 B

Baseline results on branch: feat/cache-tracing-console-sample

Startup times

Revision Plain With Sentry Diff
d20d0a3 327.43 ms 392.82 ms 65.38 ms
ef00e7d 321.84 ms 398.02 ms 76.18 ms

App size

Revision Plain With Sentry Diff
d20d0a3 0 B 0 B 0 B
ef00e7d 0 B 0 B 0 B

Previous results on branch: feat/cache-tracing-all-samples

Startup times

Revision Plain With Sentry Diff
9ce8a42 333.64 ms 422.30 ms 88.66 ms

App size

Revision Plain With Sentry Diff
9ce8a42 0 B 0 B 0 B

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sentry
Copy link

sentry bot commented Mar 10, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.1 (1) release

@adinauer
Copy link
Member Author

@sentry review

@adinauer adinauer marked this pull request as ready for review March 10, 2026 14:32
@adinauer
Copy link
Member Author

cursor review

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@sentry
Copy link

sentry bot commented Mar 10, 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