Skip to content

Conversation

@mwear
Copy link
Member

@mwear mwear commented Jan 25, 2020

OTEP 66 has a section where it offers guidance on how to parent a Span given a Context. This PR integrates those details into the api-tracing spec.

The bulk of this PR is the following text:

Parenting from a Context

When a new Span is created from a Context there are several scenarios to
consider when selecting a parent. A Context can contain:

  • A current Span
  • An extracted SpanContext
  • A current Span and an extracted SpanContext
  • Neither a current Span or an extracted Span context

In order handle these scenarios, a convention has been established for assigning
a parent from a Context. The precedence for parent selection is as follows:

  • Use the current Span.
  • Use the extracted SpanContext.
  • There is no parent. Create a root Span.

@mwear mwear force-pushed the context_prop_span_parentage_updates branch from b63f14b to ed3200a Compare January 25, 2020 01:43
mwear and others added 3 commits January 24, 2020 17:43
Co-Authored-By: Yuri Shkuro <[email protected]>
Co-Authored-By: Yuri Shkuro <[email protected]>
Co-Authored-By: Yuri Shkuro <[email protected]>
@mwear
Copy link
Member Author

mwear commented Jan 25, 2020

I should have batched the suggestions, but thanks for the review @yurishkuro.

mwear and others added 2 commits January 27, 2020 11:12
@yurishkuro yurishkuro changed the title Add details for parenting a span from a context Add details for determining the parent Span from a Context Jan 28, 2020
@bogdandrutu bogdandrutu merged commit cf0bb60 into open-telemetry:master Jan 28, 2020
MikeGoldsmith added a commit to MikeGoldsmith/opentelemetry-specification that referenced this pull request Feb 6, 2020
…elemetry-specification into remove-binary-format

* 'remove-binary-format' of github.com:MikeGoldsmith/opentelemetry-specification:
  update Resource spec based on the move to the SDK and named tracers (open-telemetry#421)
  sdk-tracer: replace Factory with Provider (open-telemetry#422)
  Add details for determining the parent Span from a Context (open-telemetry#423)
SergeyKanzhelev pushed a commit to SergeyKanzhelev/opentelemetry-specification that referenced this pull request Feb 18, 2020
…metry#423)

* Add details for parenting a span from a context

* Integrate suggested feedback

* Apply suggestion

Co-Authored-By: Yuri Shkuro <[email protected]>

* Apply suggestion

Co-Authored-By: Yuri Shkuro <[email protected]>

* Apply suggestion

Co-Authored-By: Yuri Shkuro <[email protected]>

* Add comma

Co-Authored-By: Armin Ruech <[email protected]>

* Rephrase parenting a span

* Fix broken link

Co-authored-by: Yuri Shkuro <[email protected]>
Co-authored-by: Armin Ruech <[email protected]>
Co-authored-by: Bogdan Drutu <[email protected]>
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
…metry#423)

* Add details for parenting a span from a context

* Integrate suggested feedback

* Apply suggestion

Co-Authored-By: Yuri Shkuro <[email protected]>

* Apply suggestion

Co-Authored-By: Yuri Shkuro <[email protected]>

* Apply suggestion

Co-Authored-By: Yuri Shkuro <[email protected]>

* Add comma

Co-Authored-By: Armin Ruech <[email protected]>

* Rephrase parenting a span

* Fix broken link

Co-authored-by: Yuri Shkuro <[email protected]>
Co-authored-by: Armin Ruech <[email protected]>
Co-authored-by: Bogdan Drutu <[email protected]>
schmikei pushed a commit to schmikei/opentelemetry-specification that referenced this pull request Apr 17, 2025
schmikei pushed a commit to schmikei/opentelemetry-specification that referenced this pull request Apr 17, 2025
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.

7 participants