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

SpanContext.IsRemote is false on remote children #538

Merged

Conversation

toumorokoshi
Copy link
Member

@toumorokoshi toumorokoshi commented Mar 31, 2020

The IsRemote flag should be false on children of remote spans,
as the span itself was created locally.

Fixes #523

The IsRemote flag should be false on children of remote spans,
as the span itself was created locally.
@toumorokoshi toumorokoshi force-pushed the feature/document-isremote branch from e20ce29 to 53d4dbf Compare March 31, 2020 15:58
@@ -178,7 +178,7 @@ the same trace.
TraceID and a non-zero SpanID.

`IsRemote` is a boolean flag which returns true if the SpanContext was propagated
from a remote parent.
from a remote parent. A child of a remote span should have IsRemote set to false.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from a remote parent. A child of a remote span should have IsRemote set to false.
from a remote parent.
When creating children from remote spans, their IsRemote flag MUST be set to false.

Otherwise one could interpret this as "The child span's IsRemote flag must always be false if the parent used to be remote, even after the child was propagated.".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, thank you!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only "from remote spans"? I think this part is redundant. Of course when creating children from local spans, their IsRemote flag MUST also be false.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, what about spans that are no children at all, but root spans? Of course their IsRemote flag MUST also be false. I think we should try to find a better way to phrase this.

Otherwise one could interpret this as "The child span's IsRemote flag must always be false if the parent used to be remote, even after the child was propagated.".

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

@Oberon00 Oberon00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bogdandrutu bogdandrutu merged commit 8c2d6c2 into open-telemetry:master Apr 1, 2020
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
* SpanContext.IsRemote is false on remote children

The IsRemote flag should be false on children of remote spans,
as the span itself was created locally.

* Update specification/api-tracing.md

Otherwise one could interpret this as "The child span's IsRemote flag must always be false if the parent used to be remote, even after the child was propagated.".

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

Co-authored-by: Armin Ruech <armin.ruech@gmail.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.

Document IsRemote flag should not be propagated to children.
5 participants