-
-
Notifications
You must be signed in to change notification settings - Fork 451
Set thread information on transaction from OpenTelemetry attributes #4478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Performance metrics 🚀
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
private void maybeTransferOtelThreadAttributes( | ||
final @NotNull SpanData span, final @NotNull ITransaction sentryTransaction) { | ||
final @NotNull Attributes attributes = span.getAttributes(); | ||
final @Nullable Long threadId = attributes.get(ThreadIncubatingAttributes.THREAD_ID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l
for the future should we have some helper method to simply transfer an OTel attribute to Sentry since this uses the same key anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I think it makes sense, I'll refactor
Co-authored-by: Alexander Dinauer <[email protected]>
📜 Description
If present, grabs the thread attributes from the OTEL span to populate
transaction.data.thread.id
andtransaction.data.thread.name
.💡 Motivation and Context
Closes #4336
💚 How did you test it?
Manual testing.
📝 Checklist
sendDefaultPII
is enabled.