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

Add details for determining the parent Span from a Context #423

Merged

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.

specification/api-tracing.md Outdated Show resolved Hide resolved
specification/api-tracing.md Show resolved Hide resolved
specification/api-tracing.md Outdated Show resolved Hide resolved
specification/api-tracing.md Outdated Show resolved Hide resolved
specification/api-tracing.md Outdated Show resolved Hide resolved
specification/api-tracing.md Outdated Show resolved Hide resolved
@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 <yurishkuro@users.noreply.github.com>
Co-Authored-By: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Co-Authored-By: Yuri Shkuro <yurishkuro@users.noreply.github.com>
@mwear
Copy link
Member Author

mwear commented Jan 25, 2020

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

specification/api-tracing.md Outdated Show resolved Hide resolved
specification/api-tracing.md Outdated Show resolved Hide resolved
specification/api-tracing.md Outdated Show resolved Hide resolved
mwear and others added 2 commits January 27, 2020 11:12
Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>
@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 <yurishkuro@users.noreply.github.com>

* Apply suggestion

Co-Authored-By: Yuri Shkuro <yurishkuro@users.noreply.github.com>

* Apply suggestion

Co-Authored-By: Yuri Shkuro <yurishkuro@users.noreply.github.com>

* Add comma

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>

* Rephrase parenting a span

* Fix broken link

Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Co-authored-by: Armin Ruech <armin.ruech@gmail.com>
Co-authored-by: Bogdan Drutu <lazy@splunk.com>
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 <yurishkuro@users.noreply.github.com>

* Apply suggestion

Co-Authored-By: Yuri Shkuro <yurishkuro@users.noreply.github.com>

* Apply suggestion

Co-Authored-By: Yuri Shkuro <yurishkuro@users.noreply.github.com>

* Add comma

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>

* Rephrase parenting a span

* Fix broken link

Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Co-authored-by: Armin Ruech <armin.ruech@gmail.com>
Co-authored-by: Bogdan Drutu <lazy@splunk.com>
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