Skip to content

Commit

Permalink
feat: start a root span with spanOptions.parent = null (open-telemetr…
Browse files Browse the repository at this point in the history
…y#889)

* feat: start a root span with spanOptions.parent = null

* chore: lint

* chore: add return type for readability
  • Loading branch information
dyladan committed Feb 18, 2021
1 parent 41e0d74 commit 5319e53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/src/trace/SpanOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export interface SpanOptions {
* A parent `SpanContext` (or `Span`, for convenience) that the newly-started
* span will be the child of. This overrides the parent span extracted from
* the currently active context.
*
* A null value here should prevent the SDK from extracting a parent from
* the current context, forcing the new span to be a root span.
*/
parent?: Span | SpanContext | null;

Expand Down

0 comments on commit 5319e53

Please sign in to comment.