-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tracing): Allow unsampled transactions to be findable by `getTran…
…saction()` (#2952) Adds a pointer to each span, pointing at that span's enclosing transaction, and changes `getTransaction()` to use it.
- Loading branch information
1 parent
bead28c
commit 5ac0fca
Showing
6 changed files
with
39 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,7 @@ describe('Hub', () => { | |
expect(hub.getScope()?.getTransaction()).toBe(transaction); | ||
}); | ||
|
||
// TODO add this back in once getTransaction() returns sampled = false transactions, too | ||
it.skip('should find a transaction which has been set on the scope if sampled = false', () => { | ||
it('should find a transaction which has been set on the scope if sampled = false', () => { | ||
const hub = new Hub(new BrowserClient({ tracesSampleRate: 1 })); | ||
const transaction = hub.startTransaction({ name: 'dogpark', sampled: false }); | ||
|
||
|
@@ -384,8 +383,7 @@ describe('Hub', () => { | |
expect(extractTraceparentData(headers['sentry-trace'])!.parentSampled).toBe(true); | ||
}); | ||
|
||
// TODO add this back in once getTransaction() returns sampled = false transactions, too | ||
it.skip('should propagate negative sampling decision to child transactions in XHR header', () => { | ||
it('should propagate negative sampling decision to child transactions in XHR header', () => { | ||
const hub = new Hub( | ||
new BrowserClient({ | ||
dsn: 'https://[email protected]/1121', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters