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

Propose a new way to continue a trace #14

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove HTTP option
  • Loading branch information
cleptric committed Sep 29, 2022
commit 9b55122ef7ef9124ffe64e9a0be682a022b15cdc
4 changes: 1 addition & 3 deletions text/0014-continue-traces.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ $transactionContext = new TransactionContext();
$transaction = startTransaction($transactionContext, [], bool $continueTrace = true);
```

This would require making the SDKs aware of the current request.
In PHP, we could rely on `$_SERVER['HTTP_SENTRY_TRACE]` and `$_SERVER['HTTP_BAGGAGE]`, but this is not possible in all languages.
Inside `TransactionContext::__contruct`, we could check for an ongoing transaction on the Hub and continue the trace automatically.

# Unresolved questions

* Can we rely on `SentrySdk::getCurrentHub()->getTransaction()` to fetch the current transaction to be passed into `TransactionContext::fromParent()` ?
* How would we make `TransactionContext::__construct()` aware of the current request?