Skip to content

Use Sentry.with_child_span in redis and net/http patches#1920

Merged
sl0thentr0py merged 1 commit intomasterfrom
neel/use-with-child-span
Oct 20, 2022
Merged

Use Sentry.with_child_span in redis and net/http patches#1920
sl0thentr0py merged 1 commit intomasterfrom
neel/use-with-child-span

Conversation

@sl0thentr0py
Copy link
Copy Markdown
Member

@sl0thentr0py sl0thentr0py commented Oct 20, 2022

Move away from using span.start_child explicitly and use the top level Sentry.with_child_span.

This is necessary going forward for having some top-level api control for disabling sentry instrumentation if we're using open telemetry.

Note: I had to remove one net/http test for the unsampled case since that behaviour changed now. But this is fine as in principle the sampled flag just controls the final hub.capture_event and not the actual span recording.

@sl0thentr0py sl0thentr0py changed the title Use Sentry.with_child_span in redis and net/http patches Use Sentry.with_child_span in redis and net/http patches Oct 20, 2022
@sl0thentr0py sl0thentr0py requested a review from st0012 October 20, 2022 13:13
Copy link
Copy Markdown
Contributor

@st0012 st0012 left a comment

Choose a reason for hiding this comment

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

This may be nitpicking, but if there's a behaviour change, is it still just a refactoring?
Should the user notice anything from the changes? e.g. different span nesting

@st0012 st0012 added this to the 6.0.0 milestone Oct 20, 2022
@sl0thentr0py
Copy link
Copy Markdown
Member Author

@st0012 yea fair point, the nesting might change (be more accurate).
I'll move the changelog entry.

@sl0thentr0py sl0thentr0py force-pushed the neel/use-with-child-span branch from 4b71290 to 2a261f0 Compare October 20, 2022 16:24
@sl0thentr0py sl0thentr0py force-pushed the neel/use-with-child-span branch from 2a261f0 to c27f518 Compare October 20, 2022 16:52
@sl0thentr0py sl0thentr0py merged commit 3097c49 into master Oct 20, 2022
@sl0thentr0py sl0thentr0py deleted the neel/use-with-child-span branch October 20, 2022 17:00
@st0012 st0012 modified the milestones: 6.0.0, 5.6.0 Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

3 participants