Skip to content

POTEL 34 - Retrieve the correct current span from Scope/Scopes#3554

Merged
adinauer merged 11 commits into8.x.xfrom
feat/potel-34-use-span-from-scope-in-span-factory
Jul 5, 2024
Merged

POTEL 34 - Retrieve the correct current span from Scope/Scopes#3554
adinauer merged 11 commits into8.x.xfrom
feat/potel-34-use-span-from-scope-in-span-factory

Conversation

@adinauer
Copy link
Copy Markdown
Member

@adinauer adinauer commented Jul 5, 2024

📜 Description

Use scope.getSpan()/scopes.getSpan() in OtelSpanFactory when retrieving the current span.

💡 Motivation and Context

This allows us to also retrieve the correct current span even if we're not looking at the currently active scope.
Context.current() vs. whatever Scopes is queried for the current span.

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • 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.
  • 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 5, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 8e976ec

Copy link
Copy Markdown
Collaborator

@lbloder lbloder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@adinauer adinauer merged commit 34c47d4 into 8.x.x Jul 5, 2024
@adinauer adinauer deleted the feat/potel-34-use-span-from-scope-in-span-factory branch July 5, 2024 14:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 5, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 450.50 ms 513.54 ms 63.04 ms
Size 1.70 MiB 2.29 MiB 599.31 KiB

Baseline results on branch: 8.x.x

Startup times

Revision Plain With Sentry Diff
57732e8 435.66 ms 510.50 ms 74.84 ms
41e496a 408.90 ms 491.32 ms 82.42 ms
2f49b9c 416.54 ms 479.14 ms 62.60 ms
a59fca2 560.08 ms 658.80 ms 98.71 ms
a0f7731 357.02 ms 433.40 ms 76.38 ms

App size

Revision Plain With Sentry Diff
57732e8 1.70 MiB 2.29 MiB 599.77 KiB
41e496a 1.70 MiB 2.29 MiB 599.77 KiB
2f49b9c 1.70 MiB 2.29 MiB 599.31 KiB
a59fca2 1.70 MiB 2.29 MiB 599.77 KiB
a0f7731 1.70 MiB 2.29 MiB 599.77 KiB

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.

3 participants