Unclear documentation for link types
samuelhorwitz opened this issue · 2 comments
Describe the bug
Visiting the Go docs on Link Type, you'll see that the comments are as follows:
const (
LinkTypeUnspecified LinkType = iota // The relationship of the two spans is unknown.
LinkTypeChild // The current span is a child of the linked span.
LinkTypeParent // The current span is the parent of the linked span.
)
However, I couldn't tell if this was correct looking at how Stackdriver displays it (the wording is strange, it's vague and makes it seem as though using LinkTypeChild
presents the linked span as a child of the current). I decided to take a look at some other library docs, and in the Java documentation it appears the definition is the opposite:
CHILD_LINKED_SPAN
When the linked Span is a child of the current Span.
PARENT_LINKED_SPAN
When the linked Span is a parent of the current Span.
To Reproduce
See my above documentation links
Expected behavior
Clarity needed on what is correct, expected behavior shouldn't actually change code-wise, only what choice should be made by the developer
Additional context
N/A
@samuelhorwitz Java definition is correct. i'll fix the go definition.