Skip to content

feat(spring): [Cache Tracing 3] Add BeanPostProcessor and auto-configuration#5174

Open
adinauer wants to merge 8 commits intofeat/cache-tracing-optionfrom
feat/cache-tracing-autoconfig
Open

feat(spring): [Cache Tracing 3] Add BeanPostProcessor and auto-configuration#5174
adinauer wants to merge 8 commits intofeat/cache-tracing-optionfrom
feat/cache-tracing-autoconfig

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)
  • #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 SentryCacheBeanPostProcessor to automatically wrap CacheManager beans in SentryCacheManagerWrapper. Registers it in Spring Boot 4 auto-configuration, gated behind sentry.enable-cache-tracing=true.

💚 How did you test it?

  • SentryCacheBeanPostProcessorTest — wraps CacheManager, skips non-CacheManager, no double-wrap
  • SentryAutoConfigurationTest — bean registered when property=true, not registered when missing or false

📝 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.

adinauer and others added 2 commits March 9, 2026 09:06
…uration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@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).


New Features ✨

Core

  • [Cache Tracing 2] Add enableCacheTracing option by adinauer in #5173
  • [Cache Tracing 2] Add enableCacheTracing option by adinauer in #5163

Spring

  • [Cache Tracing 3] Add BeanPostProcessor and auto-configuration by adinauer in #5174
  • [Cache Tracing 1] Add SentryCacheWrapper and SentryCacheManagerWrapper by adinauer in #5172
  • [Cache Tracing 1] Add SentryCacheWrapper and SentryCacheManagerWrapper by adinauer in #5162
  • [Cache Tracing 1] Add SentryCacheWrapper and SentryCacheManagerWrapper by adinauer in #5137

Other

  • (anr) Profile main thread when ANR and report ANR profiles to Sentry by markushi in #4899

Bug Fixes 🐛

  • Remove the dependency on protobuf-lite for tombstones by supervacuus in #5157

🤖 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 8d588b2

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 321.84 ms 362.06 ms 40.22 ms
Size 0 B 0 B 0 B

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

Startup times

Revision Plain With Sentry Diff
6dcba10 285.09 ms 372.84 ms 87.75 ms
00e75e5 309.10 ms 360.94 ms 51.84 ms
e1f4f5b 309.67 ms 365.26 ms 55.59 ms
206ee68 312.72 ms 356.96 ms 44.24 ms
d11fa83 366.46 ms 441.14 ms 74.68 ms

App size

Revision Plain With Sentry Diff
6dcba10 1.58 MiB 2.29 MiB 722.92 KiB
00e75e5 0 B 0 B 0 B
e1f4f5b 0 B 0 B 0 B
206ee68 0 B 0 B 0 B
d11fa83 0 B 0 B 0 B

Previous 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

Co-Authored-By: Claude <noreply@anthropic.com>
@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

Copy link
Collaborator

@lbloder lbloder left a comment

Choose a reason for hiding this comment

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

LGTM 👍

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

@sentry
Copy link

sentry bot commented Mar 10, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.1 (1) release

@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
Copy link
Member Author

cursor review

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.

2 participants