Skip to content

Tracing without performance: new continue_trace api#2089

Merged
sl0thentr0py merged 6 commits intoneel/twpfrom
neel/twp-continue-trace
Aug 31, 2023
Merged

Tracing without performance: new continue_trace api#2089
sl0thentr0py merged 6 commits intoneel/twpfrom
neel/twp-continue-trace

Conversation

@sl0thentr0py
Copy link
Copy Markdown
Member

@sl0thentr0py sl0thentr0py commented Aug 10, 2023

This PR is 2/2 to enable Tracing without Performance, i.e. make sure all our events are connected even if they are not Transactions.

Summary of changes

  • Implement new top level Sentry.continue_trace(env, **options) API that standardizes continuing an incoming trace from a rack env like hash.
  • Use this new API in rack/rails/sidekiq

part of #2056
linked to #2084

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 10, 2023

@sl0thentr0py sl0thentr0py force-pushed the neel/twp-continue-trace branch from bdc6359 to b1bf79f Compare August 16, 2023 11:36
@sl0thentr0py sl0thentr0py force-pushed the neel/twp branch 2 times, most recently from 05c5f27 to 0afa9a3 Compare August 16, 2023 11:43
@sl0thentr0py sl0thentr0py force-pushed the neel/twp-continue-trace branch from b1bf79f to abe9393 Compare August 16, 2023 11:47
@sl0thentr0py sl0thentr0py force-pushed the neel/twp-continue-trace branch from abe9393 to 199fdf4 Compare August 16, 2023 12:10
@sl0thentr0py sl0thentr0py force-pushed the neel/twp branch 2 times, most recently from 9ffcc1f to 23a4d06 Compare August 16, 2023 12:17
@sl0thentr0py sl0thentr0py force-pushed the neel/twp-continue-trace branch 2 times, most recently from 600599d to dfc22a4 Compare August 16, 2023 12:39
@sl0thentr0py sl0thentr0py changed the title New continue_trace api Tracing without performance: new continue_trace api Aug 16, 2023
@sl0thentr0py sl0thentr0py requested a review from st0012 August 16, 2023 12:44
@sl0thentr0py sl0thentr0py force-pushed the neel/twp branch 2 times, most recently from 83541fd to c6d3bfe Compare August 29, 2023 13:22
@sl0thentr0py sl0thentr0py force-pushed the neel/twp-continue-trace branch from dfc22a4 to 96fe215 Compare August 29, 2023 13:45
@sl0thentr0py sl0thentr0py marked this pull request as ready for review August 30, 2023 11:03
@sl0thentr0py sl0thentr0py requested a review from cleptric August 30, 2023 11:04
@sl0thentr0py sl0thentr0py force-pushed the neel/twp-continue-trace branch from e7d1e9f to e23bd3a Compare August 30, 2023 12:11
@sl0thentr0py sl0thentr0py force-pushed the neel/twp-continue-trace branch from e23bd3a to fd07c39 Compare August 30, 2023 12:28
@sl0thentr0py
Copy link
Copy Markdown
Member Author

sl0thentr0py commented Aug 31, 2023

@st0012 we're going forward with merging these PRs, let me know later if you see some significant problem

@sl0thentr0py sl0thentr0py merged commit 48717de into neel/twp Aug 31, 2023
@sl0thentr0py sl0thentr0py deleted the neel/twp-continue-trace branch August 31, 2023 11:26
sl0thentr0py added a commit that referenced this pull request Sep 1, 2023
This PR is 1/2 to enable **Tracing without Performance**, i.e. make sure all our events are connected even if they are not Transactions.

This enables use cases such as Errors / Transactions / Replays etc all being connected across services and not just Transactions.

### Summary of changes

* new `PropagationContext` class that generates trace/span ids and baggage irrespective of whether there are transactions/spans active or not
* this lives on the `Scope`
* three new top level methods that first check the span and fallback on the scope's propagation context
  * `Sentry.get_traceparent`
  * `Sentry.get_baggage`
  * `Sentry.get_trace_propagation_headers`
* move `dynamic_sampling_context` to `Event` from `TransactionEvent` since all events will now have this info
* use the new top level helpers in `net/http` patch to set propagation headers

closes #2056 
also see #2089 

---

This PR is 2/2 to enable Tracing without Performance, i.e. make sure all our events are connected even if they are not Transactions.

### Summary of changes
* Implement new top level `Sentry.continue_trace(env, **options)` API that standardizes continuing an incoming trace from a rack env like hash.
* Use this new API in rack/rails/sidekiq

part of #2056 
linked to #2084
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