Skip to content

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

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

feat(spring): [Cache Tracing 3] Add BeanPostProcessor and auto-configuration#5164
adinauer merged 2 commits intofeat/cache-tracingfrom
feat/cache-tracing-autoconfig

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

adinauer commented Mar 5, 2026

PR Stack (Cache Tracing)

  • #5161Collection PR (full diff → main)
  • #5162 — Add SentryCacheWrapper and SentryCacheManagerWrapper
  • #5163 — Add enableCacheTracing option
  • #5164 — Add BeanPostProcessor and auto-configuration

@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).


New Features ✨

Spring

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

Other

  • (core) [Cache Tracing 2] Add enableCacheTracing option by adinauer in #5163

Bug Fixes 🐛

  • (screenshot) Add dontwarn replay rules to sentry-android-core by romtsn in #5153
  • (sessions) Finalize previous session even when auto session tracking is disabled by romtsn in #5154

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- [Cache Tracing 3] Add BeanPostProcessor and auto-configuration ([#5164](https://github.com/getsentry/sentry-java/pull/5164))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 84f4889

@adinauer adinauer mentioned this pull request Mar 5, 2026
3 tasks
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 345.45 ms 402.42 ms 56.98 ms
Size 0 B 0 B 0 B

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

Startup times

Revision Plain With Sentry Diff
e1f4f5b 309.67 ms 365.26 ms 55.59 ms
6dcba10 285.09 ms 372.84 ms 87.75 ms

App size

Revision Plain With Sentry Diff
e1f4f5b 0 B 0 B 0 B
6dcba10 1.58 MiB 2.29 MiB 722.92 KiB

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

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adinauer adinauer force-pushed the feat/cache-tracing-autoconfig branch from 7ba327c to 84f4889 Compare March 9, 2026 08:07
Base automatically changed from feat/cache-tracing-option to feat/cache-tracing March 9, 2026 08:07
@adinauer adinauer merged commit 84f4889 into feat/cache-tracing Mar 9, 2026
54 of 55 checks passed
@adinauer adinauer deleted the feat/cache-tracing-autoconfig 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