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

Make tracer to add ignored parents as links as an option, add initial semantic conventions for links #436

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions specification/api-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@ a root span, and MUST generate a new `TraceId` for each root span created.
For a Span with a parent, the `TraceId` MUST be the same as the parent.
Also, the child span MUST inherit all `TraceState` values of its parent by default.

The option for creating a span as a root span should allow to choose whether the
Copy link
Member

Choose a reason for hiding this comment

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

another option may be to add traceparent of the ignored parent to the tracestate. It may be more involved design as we will need to decide how the key in tracestate will be called and how to write the original traceparent value there.

What scenario do you envision here? Can it be implemented via the SpanProcessor so customer may apply some custom logic like I described with the tracestate?

ignored parents in `Context` should be captured as links in the new span. If the
links should be captured then the implementation SHOULD add those possible
parents as [`Link`s](#add-links) to the new `Span`. For description of the
ignored-parent link attributes, see [Link
Conventions](data-link-semantic-conventions.md#ignored-parent). The capturing is
off by default.

A `Span` is said to have a _remote parent_ if it is the child of a `Span`
created in another process. Each propagators' deserialization must set
`IsRemote` to true on a parent `SpanContext` so `Span` creation knows if the
Expand Down
29 changes: 29 additions & 0 deletions specification/data-link-semantic-conventions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Link Conventions

This document is about standard attributes for
[Links](api-tracing.md#add-links).

## Document conventions

Attributes are divided into groups, describing certain characteristics of a
link. Attributes in each group start with a specified prefix and a dot.

Attribute groups in this document have a **Required** column. If a link has at
least one attribute from the group, then it MUST also contain all the required
attributes of the group.

## Link types

* [Ignored parent](#ignored-parent)

### Ignored parent

**Prefix:** parent

**Description:** These attributes are used to denote a span context that was
ignored during a span creation as a parent and thus became only linked to the
span.

| Attribute | Description | Example | Required? |
|---|---|---|---|
| parent.kind | Kind of ignored span context. It MUST be either "local" or "remote". "local" denotes a span context that was a part of a current span at the time of a creation of the link. "remote" denotes a span context that was a part of remote span at the time of a creation of the link. | "local" | Yes |
1 change: 1 addition & 0 deletions specification/data-semantic-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Span attributes.

* [Resource Conventions](data-resource-semantic-conventions.md)
* [Span Conventions](#span-conventions)
* [Link Conventions](data-link-semantic-conventions.md)

The type of the attribute SHOULD be specified in the semantic convention
for that attribute. Array values are allowed for attributes. For
Expand Down