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

Producer SpanKind does not always imply a remote call #371

Merged
merged 5 commits into from
Dec 10, 2019
Merged
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
12 changes: 7 additions & 5 deletions specification/api-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ Span represents a synchronous call. When a child span is synchronous,
the parent is expected to wait for it to complete under ordinary
circumstances. It can be useful for tracing systems to know this
property, since synchronous Spans may contribute to the overall trace
latency.
latency. Asynchronous scenarios can be remote or local.

In order for `SpanKind` to be meaningful, callers should arrange that
a single Span does not serve more than one purpose. For example, a
Expand All @@ -579,9 +579,11 @@ These are the possible SpanKinds:
* `PRODUCER` Indicates that the span describes the parent of an
asynchronous request. This parent span is expected to end before
the corresponding child `CONSUMER` span, possibly even before the
child span starts.
child span starts. In messaging scenarios with batching, tracing
SergeyKanzhelev marked this conversation as resolved.
Show resolved Hide resolved
individual messages requires a new `PRODUCER` span per message to
be created.
* `CONSUMER` Indicates that the span describes the child of an
asynchronous remote `PRODUCER` request.
asynchronous `PRODUCER` request.
* `INTERNAL` Default value. Indicates that the span represents an
internal operation within an application, as opposed to an
operations with remote parents or children.
Expand All @@ -592,6 +594,6 @@ To summarize the interpretation of these kinds:
|--|--|--|--|--|
| `CLIENT` | yes | | | yes |
| `SERVER` | yes | | yes | |
| `PRODUCER` | | yes | | yes|
| `CONSUMER` | | yes | yes | |
| `PRODUCER` | | yes | | maybe |
| `CONSUMER` | | yes | maybe | |
| `INTERNAL` | | | | |