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

It should be possible to propagate context with only the API #1456

Closed
dyladan opened this issue Aug 21, 2020 · 3 comments · Fixed by #1527
Closed

It should be possible to propagate context with only the API #1456

dyladan opened this issue Aug 21, 2020 · 3 comments · Fixed by #1527

Comments

@dyladan
Copy link
Member

dyladan commented Aug 21, 2020

open-telemetry/opentelemetry-specification#719

When a span is started with a valid parent using the NoOp tracing API, the span's context should be the same as the context of the parent.

const tracer = api.trace.getTracer(name);

const parent = { traceId, spanId, traceFlags };

const span = tracer.startSpan(spanName, { parent });

assert(span.context().traceId === parent.traceId);
assert(span.context().spanId === parent.spanId);
assert(span.context().traceFlags === parent.traceFlags);
const tracer = api.trace.getTracer(name);

const parentContext = api.propagation.extract(headers);

const span = tracer.startSpan(spanName, {}, parentContext);

const parent = getExtractedSpanContext(parentContext);
assert(span.context().traceId === parent.traceId);
assert(span.context().spanId === parent.spanId);
assert(span.context().traceFlags === parent.traceFlags);
@dyladan dyladan added this to To do issues in GA Burndown via automation Aug 21, 2020
vmarchaud added a commit to vmarchaud/opentelemetry-js that referenced this issue Sep 13, 2020
vmarchaud added a commit to vmarchaud/opentelemetry-js that referenced this issue Sep 13, 2020
vmarchaud added a commit to vmarchaud/opentelemetry-js that referenced this issue Sep 19, 2020
vmarchaud added a commit to vmarchaud/opentelemetry-js that referenced this issue Sep 19, 2020
vmarchaud added a commit to vmarchaud/opentelemetry-js that referenced this issue Sep 23, 2020
vmarchaud added a commit to vmarchaud/opentelemetry-js that referenced this issue Sep 24, 2020
@obecny
Copy link
Member

obecny commented Sep 30, 2020

@vmarchaud hey, are you still working on that ?

@vmarchaud
Copy link
Member

vmarchaud commented Sep 30, 2020

I mean the PR is ready here (and you already approved it): #1527

@obecny
Copy link
Member

obecny commented Sep 30, 2020

a yes, thx, we just need one more approve and we are good to go

GA Burndown automation moved this from To do issues to Done Oct 1, 2020
dyladan added a commit that referenced this issue Oct 1, 2020
Co-authored-by: Bartlomiej Obecny <bobecny@gmail.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
dyladan added a commit to dyladan/opentelemetry-js that referenced this issue Sep 9, 2022
…pen-telemetry#1527)

Co-authored-by: Bartlomiej Obecny <bobecny@gmail.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
dyladan added a commit to dyladan/opentelemetry-js that referenced this issue Sep 9, 2022
…pen-telemetry#1527)

Co-authored-by: Bartlomiej Obecny <bobecny@gmail.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
GA Burndown
  
Done
Spec Compliance
Awaiting triage
Development

Successfully merging a pull request may close this issue.

3 participants