Skip to content

fix(spring-jakarta): [Queue Instrumentation 13] Align enqueue time with Python#5283

Draft
adinauer wants to merge 1 commit intofix/queue-instrumentation-retry-countfrom
fix/queue-instrumentation-enqueued-time-seconds
Draft

fix(spring-jakarta): [Queue Instrumentation 13] Align enqueue time with Python#5283
adinauer wants to merge 1 commit intofix/queue-instrumentation-retry-countfrom
fix/queue-instrumentation-enqueued-time-seconds

Conversation

@adinauer
Copy link
Copy Markdown
Member

@adinauer adinauer commented Apr 10, 2026

PR Stack (Queue Instrumentation)


📜 Description

Align sentry-task-enqueued-time format with sentry-python by storing epoch seconds in the producer interceptor and computing messaging.message.receive.latency from seconds in the consumer interceptor.

This keeps the header semantics consistent across SDKs and avoids cross-SDK parsing mismatches.

💡 Motivation and Context

F-009 identified a cross-SDK format mismatch: Java wrote epoch millis while sentry-python writes epoch seconds. Mixed-language queue pipelines could produce wrong or missing receive latency.

💚 How did you test it?

  • Ran ./gradlew spotlessApply apiDump
  • Ran ./gradlew :sentry-spring-jakarta:test --tests='*SentryProducerInterceptorTest*' --tests='*SentryKafkaRecordInterceptorTest*'
  • Updated tests to validate epoch-seconds handling and latency calculation path

📝 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

None.

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

#skip-changelog

…th Python

Store sentry-task-enqueued-time as epoch seconds and compute receive latency from seconds on the consumer side. This aligns Java Kafka queue instrumentation with sentry-python Celery behavior for cross-SDK interoperability.

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

github-actions bot commented Apr 10, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

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

@sentry
Copy link
Copy Markdown

sentry bot commented Apr 10, 2026

Sentry Build Distribution

App Name App ID Version Configuration Install Page
SDK Size io.sentry.tests.size 8.37.1 (1) release Install Build

Configure sentry-android build distribution settings

@github-actions
Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 330.43 ms 392.48 ms 62.05 ms
Size 0 B 0 B 0 B

Baseline results on branch: fix/queue-instrumentation-retry-count

Startup times

Revision Plain With Sentry Diff
2aece76 316.72 ms 373.91 ms 57.19 ms

App size

Revision Plain With Sentry Diff
2aece76 0 B 0 B 0 B

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