Skip to content

feat(spring): Cache Tracing#5165

Draft
adinauer wants to merge 2 commits intomainfrom
feat/cache-tracing
Draft

feat(spring): Cache Tracing#5165
adinauer wants to merge 2 commits intomainfrom
feat/cache-tracing

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Mar 5, 2026

Collection PR for the Cache Tracing stack. Squash-merge this once all stack PRs are merged.

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)

📜 Description

Adds auto-instrumentation for Spring's Cache abstraction, producing cache.get, cache.put, cache.remove, and cache.flush spans per the Sentry cache module spec.

💡 Motivation and Context

Closes #4120

💚 How did you test it?

See individual PRs for test details.

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

@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 ✨

  • (anr) Profile main thread when ANR and report ANR profiles to Sentry by markushi in #4899
  • (spring) Cache Tracing by adinauer in #5165

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 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 ([#5165](https://github.com/getsentry/sentry-java/pull/5165))

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 ffb6ae4

@sentry
Copy link

sentry bot commented Mar 9, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.1 (1) release

@adinauer adinauer force-pushed the feat/cache-tracing branch from b2dbb4d to 7735a81 Compare March 9, 2026 08:11
@sentry
Copy link

sentry bot commented Mar 9, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.1 (1) release

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 318.29 ms 383.77 ms 65.49 ms
Size 0 B 0 B 0 B

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ee747ae 386.94 ms 431.43 ms 44.49 ms
539ca63 313.51 ms 355.43 ms 41.92 ms
22f4345 312.78 ms 347.40 ms 34.62 ms
9fbb112 401.87 ms 515.87 ms 114.00 ms
fcec2f2 357.47 ms 447.32 ms 89.85 ms
d15471f 361.89 ms 378.07 ms 16.18 ms
d15471f 303.49 ms 439.08 ms 135.59 ms
0eaac1e 320.04 ms 369.52 ms 49.48 ms
a5ab36f 320.47 ms 389.77 ms 69.30 ms
27d7cf8 369.82 ms 422.62 ms 52.80 ms

App size

Revision Plain With Sentry Diff
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
539ca63 1.58 MiB 2.12 MiB 551.41 KiB
22f4345 1.58 MiB 2.29 MiB 719.83 KiB
9fbb112 1.58 MiB 2.11 MiB 539.18 KiB
fcec2f2 1.58 MiB 2.12 MiB 551.50 KiB
d15471f 1.58 MiB 2.13 MiB 559.54 KiB
d15471f 1.58 MiB 2.13 MiB 559.54 KiB
0eaac1e 1.58 MiB 2.19 MiB 619.17 KiB
a5ab36f 1.58 MiB 2.12 MiB 555.26 KiB
27d7cf8 1.58 MiB 2.12 MiB 549.42 KiB

@sentry
Copy link

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

Java SDK Cache instrumentation

1 participant