-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: allow parent span to be null (#569)
* chore: allow parent span to be null * chore: revert nullish operator * chore: return undefined for missing span * test: undefined spans * test: undefined spans
- Loading branch information
1 parent
5a52eda
commit b3332e3
Showing
12 changed files
with
24 additions
and
29 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
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 |
---|---|---|
|
@@ -396,7 +396,7 @@ describe('[email protected]', () => { | |
|
||
it('should preserve correct context even when using the same callback in client.query()', done => { | ||
const spans = [tracer.startSpan('span 1'), tracer.startSpan('span 2')]; | ||
const currentSpans: (Span | null)[] = []; | ||
const currentSpans: (Span | undefined)[] = []; | ||
const queryHandler = () => { | ||
currentSpans.push(tracer.getCurrentSpan()); | ||
if (currentSpans.length === 2) { | ||
|
@@ -415,7 +415,7 @@ describe('[email protected]', () => { | |
|
||
it('should preserve correct context even when using the same promise resolver in client.query()', done => { | ||
const spans = [tracer.startSpan('span 1'), tracer.startSpan('span 2')]; | ||
const currentSpans: (Span | null)[] = []; | ||
const currentSpans: (Span | undefined)[] = []; | ||
const queryHandler = () => { | ||
currentSpans.push(tracer.getCurrentSpan()); | ||
if (currentSpans.length === 2) { | ||
|
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