Skip to content
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

Tracing without performance: new continue_trace api #2089

Merged
merged 6 commits into from
Aug 31, 2023

Conversation

sl0thentr0py
Copy link
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

@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 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
sentry-ruby/lib/sentry/hub.rb Outdated Show resolved Hide resolved
sentry-ruby/lib/sentry/hub.rb Outdated Show resolved Hide resolved
@sl0thentr0py sl0thentr0py force-pushed the neel/twp branch 2 times, most recently from 83541fd to c6d3bfe Compare August 29, 2023 13:22
@sl0thentr0py sl0thentr0py marked this pull request as ready for review August 30, 2023 11:03
@sl0thentr0py
Copy link
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
92 of 95 checks passed
@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