@@ -200,7 +200,7 @@ sub-operations.
200200
201201` Span ` s encapsulate:
202202
203- - The operation name
203+ - The span name
204204- An immutable [ ` SpanContext ` ] ( #spancontext ) that uniquely identifies the
205205 ` Span `
206206- A parent span in the form of a [ ` Span ` ] ( #span ) , [ ` SpanContext ` ] ( #spancontext ) ,
@@ -212,6 +212,24 @@ sub-operations.
212212- A list of timestamped [ ` Event ` s] ( #add-events )
213213- A [ ` Status ` ] ( #set-status ) .
214214
215+ The _ span name_ is a human-readable string which concisely identifies the work
216+ represented by the Span, for example, an RPC method name, a function name,
217+ or the name of a subtask or stage within a larger computation. The span name
218+ should be the most general string that identifies a (statistically) interesting
219+ _ class of Spans_ , rather than individual Span instances. That is, "get_user" is
220+ a reasonable name, while "get_user/314159", where "314159" is a user ID, is not
221+ a good name due to its high cardinality.
222+
223+ For example, here are potential span names for an endpoint that gets a
224+ hypothetical account information:
225+
226+ | Span Name | Guidance |
227+ | ----------------- | ------------ |
228+ | ` get ` | Too general |
229+ | ` get_account/42 ` | Too specific |
230+ | ` get_account ` | Good, and account_id=42 would make a nice Span attribute |
231+ | ` get_account/{accountId} ` | Also good (using the "HTTP route") |
232+
215233The ` Span ` 's start and end timestamps reflect the elapsed real time of the
216234operation. A ` Span ` 's start time SHOULD be set to the current time on [ span
217235creation] ( #span-creation ) . After the ` Span ` is created, it SHOULD be possible to
@@ -238,7 +256,7 @@ as a separate operation.
238256
239257The API MUST accept the following parameters:
240258
241- - The operation name. This is a required parameter.
259+ - The span name. This is a required parameter.
242260- The parent Span or parent Span context, and whether the new ` Span ` should be a
243261 root ` Span ` . API MAY also have an option for implicit parent context
244262 extraction from the current context as a default behavior.
@@ -428,7 +446,7 @@ started with the explicit timestamp from the past at the moment where the final
428446
429447Required parameters:
430448
431- - The new ** operation name** , which supersedes whatever was passed in when the
449+ - The new ** span name** , which supersedes whatever was passed in when the
432450 ` Span ` was started
433451
434452#### End
0 commit comments