Skip to content

Commit

Permalink
Clarify span name criteria (resolves #557). (#810)
Browse files Browse the repository at this point in the history
* Clarify span name criteria.

* Clarify that human-readility is still something we want.
  • Loading branch information
Oberon00 authored Aug 19, 2020
1 parent a6dd3a1 commit e52c763
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions specification/trace/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,16 @@ the entire operation and, optionally, one or more sub-spans for its sub-operatio
- A list of timestamped [`Event`s](#add-events)
- A [`Status`](#set-status).

The _span name_ is a human-readable string which concisely identifies the work
represented by the Span, for example, an RPC method name, a function name,
or the name of a subtask or stage within a larger computation. The span name
should be the most general string that identifies a (statistically) interesting
_class of Spans_, rather than individual Span instances. That is, "get_user" is
a reasonable name, while "get_user/314159", where "314159" is a user ID, is not
a good name due to its high cardinality.
The _span name_ concisely identifies the work represented by the Span,
for example, an RPC method name, a function name,
or the name of a subtask or stage within a larger computation.
The span name SHOULD be the most general string that identifies a
(statistically) interesting _class of Spans_,
rather than individual Span instances while still being human-readable.
That is, "get_user" is a reasonable name, while "get_user/314159",
where "314159" is a user ID, is not a good name due to its high cardinality.
Generality SHOULD be prioritized over human-readability.


For example, here are potential span names for an endpoint that gets a
hypothetical account information:
Expand Down

0 comments on commit e52c763

Please sign in to comment.