Skip to content

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Aug 11, 2025

📜 Description

In 8.18.0 we introduced a change that caused the root OTel scope to be wrapped by Sentry using SentryContextWrapper. If the Sentry SDK hasn't been initialized yet, this would cause the Context to contain NoOpScopes meaning the SDK is broken for any code using that poisoned Context.

💡 Motivation and Context

Fixes #4622

💚 How did you test it?

📝 Checklist

  • 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

@adinauer adinauer marked this pull request as ready for review August 11, 2025 12:08
Copy link
Member Author

adinauer commented Aug 11, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 11, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 457.28 ms 519.79 ms 62.51 ms
Size 1.58 MiB 2.10 MiB 531.01 KiB

Previous results on branch: 08-11-do_not_store_no-op_scopes_onto_opentelemetry_context_when_wrapping

Startup times

Revision Plain With Sentry Diff
4586bc7 367.91 ms 479.16 ms 111.24 ms

App size

Revision Plain With Sentry Diff
4586bc7 1.58 MiB 2.10 MiB 531.01 KiB

@adinauer
Copy link
Member Author

@sentry review

@adinauer
Copy link
Member Author

cursor review

@cursor
Copy link

cursor bot commented Aug 12, 2025

🚨 Bugbot couldn't run

Something went wrong. Try again by commenting "Cursor review" or "bugbot run", or contact support (requestId: serverGenReqId_9f2447c3-65f0-416f-8c46-92bccde538c7).

@adinauer
Copy link
Member Author

Cursor review

cursor[bot]

This comment was marked as outdated.

@adinauer adinauer force-pushed the 08-11-do_not_store_no-op_scopes_onto_opentelemetry_context_when_wrapping branch from 43264f8 to 4c84c2e Compare August 12, 2025 09:54
@adinauer adinauer merged commit 90fa855 into main Aug 12, 2025
43 of 44 checks passed
@adinauer adinauer deleted the 08-11-do_not_store_no-op_scopes_onto_opentelemetry_context_when_wrapping branch August 12, 2025 11:00
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.

sentry-agent 8.18.0 causes hanging threads

3 participants