Skip to content

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

Draft
adinauer wants to merge 2 commits intofeat/cache-tracing-optionfrom
feat/cache-tracing-autoconfig
Draft

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

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Mar 3, 2026

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

💡 Motivation and Context

Part of #4120

This completes the cache tracing feature by wiring everything together via Spring Boot auto-configuration.

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

🔮 Next steps

  • Add changelog entry once stack is approved
  • Add e2e sample demonstrating cache tracing

…uration

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

github-actions bot commented Mar 3, 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 #5142
  • [Cache Tracing 1] Add SentryCacheWrapper and SentryCacheManagerWrapper by adinauer in #5137

Other

  • (core) [Cache Tracing 2] Add enableCacheTracing option by adinauer in #5141
  • (otel) Create sentry-opentelemetry-otlp module for combining OpenTelemetry SDK OTLP export with Sentry SDK by adinauer in #5100
  • (screenshot) Add screenshot masking using view hierarchy by romtsn in #5077

Bug Fixes 🐛

  • Safe unregister SystemEventsBroadcastReceiver by kollesnica1337 in #5106

Internal Changes 🔧

Deps

  • Bump getsentry/craft from 2.21.7 to 2.23.1 by dependabot in #5129
  • Update Native SDK to v0.13.1 by github-actions in #5104
  • Bump actions/upload-artifact from 6 to 7 by dependabot in #5130
  • Bump actions/download-artifact from 7 to 8 by dependabot in #5132
  • Bump gradle/actions from 5.0.1 to 5.0.2 by dependabot in #5131
  • Bump github/codeql-action from 4.32.2 to 4.32.4 by dependabot in #5109
  • Bump getsentry/craft from 2.21.2 to 2.21.7 by dependabot in #5110

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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

Generated by 🚫 dangerJS against 5ccd437

@adinauer
Copy link
Member Author

adinauer commented Mar 3, 2026

PR Stack (Cache Tracing)

  • #5137 — Add SentryCacheWrapper and SentryCacheManagerWrapper
  • #5141 — Add enableCacheTracing option
  • #5142 — Add BeanPostProcessor and auto-configuration

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 362.86 ms 440.44 ms 77.57 ms
Size 1.58 MiB 2.29 MiB 723.27 KiB

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