Add root_span implementation by sl0thentr0py · Pull Request #3513 · getsentry/sentry-python · GitHub
Skip to content

Add root_span implementation - #3513

Merged
sl0thentr0py merged 1 commit into
potel-basefrom
neel/potel/root-span
Sep 10, 2024
Merged

sl0thentr0py merged 1 commit into
potel-basefrom
neel/potel/root-span

Conversation

@sl0thentr0py

Copy link
Copy Markdown
Member
  • add and track underlying root span in a hidden attr _sentry_root_otel_span in all subsequent children spans in the span processor on start
  • wrap this underlying root otel span in a POTelSpan to act as a proxy
  • make POTelSpan constructor work with explicitly passed in otel_span
  • implement __eq__ on POTelSpan to make sure proxies to the same underlying _otel_span are considered the same

@codecov

codecov Bot commented Sep 10, 2024

Copy link
Copy Markdown

@sentrivana sentrivana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, and looks pretty non-invasive, too 👍🏻 Left one nit

Comment thread sentry_sdk/integrations/opentelemetry/potel_span_processor.py Outdated
* add and track underlying root span in a hidden attr `_sentry_root_otel_span` in all subsequent children spans in the span processor on start
* wrap this underlying root otel span in a `POTelSpan` to act as a proxy
* make `POTelSpan` constructor work with explicitly passed in `otel_span`
* implement `__eq__` on `POTelSpan` to make sure proxies to the same
  underlying `_otel_span` are considered the same
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.

2 participants