sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Set thread information on transaction from OpenTelemetry attributes

Open lcian opened this issue 7 months ago • 1 comments

:scroll: Description

If present, grabs the thread attributes from the OTEL span to populate transaction.data.thread.id and transaction.data.thread.name.

:bulb: Motivation and Context

Closes #4336

:green_heart: How did you test it?

Manual testing.

:pencil: Checklist

  • [ ] I added tests to verify the changes.
  • [X] No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • [X] I updated the docs if needed.
  • [X] I updated the wizard if needed.
  • [X] Review from the native team if needed.
  • [X] No breaking change or entry added to the changelog.
  • [X] No breaking change for hybrid SDKs or communicated to hybrid SDKs.

lcian avatar Jun 06 '25 15:06 lcian

Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 404.80 ms 449.43 ms 44.63 ms
Size 1.58 MiB 2.09 MiB 518.90 KiB

Previous results on branch: lcian/fix/otel-transaction-thread

Startup times

Revision Plain With Sentry Diff
e0c26ac2da2047feaa8f0ed81440a6c61e3c45ea 438.68 ms 440.96 ms 2.28 ms
dd449bf99571bf4bdee34df6cf9f8469bbc7e0e6 415.08 ms 463.96 ms 48.88 ms

App size

Revision Plain With Sentry Diff
e0c26ac2da2047feaa8f0ed81440a6c61e3c45ea 1.58 MiB 2.08 MiB 511.11 KiB
dd449bf99571bf4bdee34df6cf9f8469bbc7e0e6 1.58 MiB 2.08 MiB 511.12 KiB

github-actions[bot] avatar Jun 06 '25 16:06 github-actions[bot]