Skip to content

Commit 152a9c3

Browse files
authored
Set span kind on span definitions or change ambiguous spans to attribute groups (#1890)
1 parent 13105b7 commit 152a9c3

File tree

13 files changed

+28
-42
lines changed

13 files changed

+28
-42
lines changed

.chloggen/1889.yaml

-4
This file was deleted.

docs/faas/aws-lambda.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The following attributes SHOULD be set:
4242
Also consider setting other attributes of the [`faas` resource][faasres] and [trace][faas] conventions
4343
and the [cloud resource conventions][cloud]. The following AWS Lambda-specific attribute MAY also be set:
4444

45-
<!-- semconv span.aws.lambda -->
45+
<!-- semconv span.aws.lambda.server -->
4646
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
4747
<!-- see templates/registry/markdown/snippet.md.j2 -->
4848
<!-- prettier-ignore-start -->

docs/faas/faas-spans.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Refer to the [Recording Errors](/docs/general/recording-errors.md) document for
3838

3939
If Spans following this convention are produced, a Resource of type `faas` MUST exist following the [Resource semantic convention](../resource/faas.md).
4040

41-
<!-- semconv span.faas -->
41+
<!-- semconv faas.attributes -->
4242
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
4343
<!-- see templates/registry/markdown/snippet.md.j2 -->
4444
<!-- prettier-ignore-start -->
@@ -242,7 +242,7 @@ This section describes how to handle the span creation and additional attributes
242242
A datasource function is triggered as a response to some data source operation such as a database or filesystem read/write.
243243
FaaS instrumentations that produce `faas` spans with trigger `datasource`, SHOULD use the following set of attributes.
244244

245-
<!-- semconv span.faas.datasource -->
245+
<!-- semconv span.faas.datasource.server -->
246246
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
247247
<!-- see templates/registry/markdown/snippet.md.j2 -->
248248
<!-- prettier-ignore-start -->
@@ -287,7 +287,7 @@ This way, it is possible to correlate each individual message with its invocatio
287287

288288
A function is scheduled to be executed regularly. The following additional attributes are recommended.
289289

290-
<!-- semconv span.faas.timer -->
290+
<!-- semconv span.faas.timer.server -->
291291
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
292292
<!-- see templates/registry/markdown/snippet.md.j2 -->
293293
<!-- prettier-ignore-start -->

docs/gen-ai/gen-ai-spans.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Additional output format details may be recorded in the future in the `gen_ai.ou
164164

165165
## Execute Tool Span
166166

167-
<!-- semconv span.gen_ai.client.execute_tool -->
167+
<!-- semconv span.gen_ai.execute_tool.internal -->
168168
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
169169
<!-- see templates/registry/markdown/snippet.md.j2 -->
170170
<!-- prettier-ignore-start -->

docs/messaging/messaging-spans.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ Messaging attributes are organized into the following namespaces:
369369

370370
Messaging system-specific attributes MUST be defined in the corresponding `messaging.{system}` namespace.
371371

372-
<!-- semconv span.messaging -->
372+
<!-- semconv messaging.attributes -->
373373
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
374374
<!-- see templates/registry/markdown/snippet.md.j2 -->
375375
<!-- prettier-ignore-start -->

docs/rpc/connect-rpc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ described on this page.
1616

1717
Below is a table of attributes that SHOULD be included on client and server Connect RPC measurements.
1818

19-
<!-- semconv span.rpc.connect_rpc(tag=connect_rpc-tech-specific) -->
19+
<!-- semconv rpc.connect_rpc.attributes -->
2020
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
2121
<!-- see templates/registry/markdown/snippet.md.j2 -->
2222
<!-- prettier-ignore-start -->

docs/rpc/grpc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ described on this page.
1616

1717
Below is a table of attributes that SHOULD be included on client and server gRPC measurements.
1818

19-
<!-- semconv span.rpc.grpc(tag=grpc-tech-specific) -->
19+
<!-- semconv rpc.grpc.attributes -->
2020
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
2121
<!-- see templates/registry/markdown/snippet.md.j2 -->
2222
<!-- prettier-ignore-start -->

docs/rpc/json-rpc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ described on this page.
1414

1515
`rpc.system` MUST be set to `"jsonrpc"`.
1616

17-
<!-- semconv span.rpc.jsonrpc(tag=jsonrpc-tech-specific) -->
17+
<!-- semconv rpc.jsonrpc.attributes -->
1818
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
1919
<!-- see templates/registry/markdown/snippet.md.j2 -->
2020
<!-- prettier-ignore-start -->

model/aws/lambda-spans.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
groups:
2-
- id: span.aws.lambda
2+
- id: span.aws.lambda.server
33
type: span
4+
span_kind: server
45
stability: development
56
brief: >
67
Span attributes used by AWS Lambda (in addition to general `faas` attributes).

model/faas/spans.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
groups:
2-
- id: span.faas
3-
type: span
2+
- id: faas.attributes
3+
type: attribute_group
44
stability: development
55
brief: >
66
This semantic convention describes an instance of a function that
@@ -21,8 +21,9 @@ groups:
2121
- ref: faas.invocation_id
2222
- ref: cloud.resource_id
2323

24-
- id: span.faas.datasource
24+
- id: span.faas.datasource.server
2525
type: span
26+
span_kind: server
2627
stability: development
2728
brief: >
2829
Semantic Convention for FaaS triggered as a response to some data
@@ -35,8 +36,9 @@ groups:
3536
- ref: faas.document.time
3637
- ref: faas.document.name
3738

38-
- id: span.faas.timer
39+
- id: span.faas.timer.server
3940
type: span
41+
span_kind: server
4042
stability: development
4143
brief: >
4244
Semantic Convention for FaaS scheduled to be executed regularly.
@@ -49,7 +51,7 @@ groups:
4951
type: span
5052
stability: development
5153
brief: >
52-
Contains additional attributes for incoming FaaS spans.
54+
Describes an incoming FaaS span.
5355
attributes:
5456
- ref: faas.coldstart
5557
- ref: faas.trigger

model/gen-ai/spans.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,10 @@ groups:
184184
requirement_level:
185185
conditionally_required: If provided by the application.
186186

187-
- id: span.gen_ai.client.execute_tool
187+
- id: span.gen_ai.execute_tool.internal
188188
type: span
189189
stability: development
190+
span_kind: internal
190191
brief: Describes tool execution span.
191192
note: |
192193
`gen_ai.operation.name` SHOULD be `execute_tool`.

model/messaging/spans.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ groups:
2828
# - ref: messaging.system
2929
# sampling_relevant: true
3030

31-
- id: span.messaging
32-
type: span
31+
- id: messaging.attributes
32+
type: attribute_group # TODO: this should be a span - https://github.com/open-telemetry/semantic-conventions/issues/1891
3333
stability: development
3434
brief: >
3535
Defines a full set of attributes used in messaging systems.

model/rpc/spans.yaml

+6-20
Original file line numberDiff line numberDiff line change
@@ -61,44 +61,34 @@ groups:
6161
- ref: network.type
6262
requirement_level: recommended
6363

64-
- id: span.rpc.grpc
65-
type: span
64+
- id: rpc.grpc.attributes
6665
stability: development
67-
extends: rpc
66+
type: attribute_group
6867
brief: 'Tech-specific attributes for gRPC.'
6968
attributes:
7069
- ref: rpc.grpc.status_code
71-
tag: grpc-tech-specific
7270
requirement_level: required
7371
- ref: rpc.grpc.request.metadata
74-
tag: grpc-tech-specific
7572
requirement_level: opt_in
7673
- ref: rpc.grpc.response.metadata
77-
tag: grpc-tech-specific
7874
requirement_level: opt_in
7975

80-
- id: span.rpc.jsonrpc
81-
type: span
76+
- id: rpc.jsonrpc.attributes
77+
type: attribute_group
8278
stability: development
83-
extends: rpc
8479
brief: 'Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).'
8580
attributes:
8681
- ref: rpc.jsonrpc.version
87-
tag: jsonrpc-tech-specific
8882
requirement_level:
8983
conditionally_required: If other than the default version (`1.0`)
9084
- ref: rpc.jsonrpc.request_id
91-
tag: jsonrpc-tech-specific
9285
requirement_level: recommended
9386
- ref: rpc.jsonrpc.error_code
94-
tag: jsonrpc-tech-specific
9587
requirement_level:
9688
conditionally_required: If response is not successful.
9789
- ref: rpc.jsonrpc.error_message
98-
tag: jsonrpc-tech-specific
9990
requirement_level: recommended
10091
- ref: rpc.method
101-
tag: jsonrpc-tech-specific
10292
requirement_level: required
10393
note: >
10494
This is always required for jsonrpc. See the note in the general
@@ -123,19 +113,15 @@ groups:
123113
- ref: rpc.message.uncompressed_size
124114
requirement_level: recommended
125115

126-
- id: span.rpc.connect_rpc
127-
type: span
116+
- id: rpc.connect_rpc.attributes
117+
type: attribute_group
128118
stability: development
129-
extends: rpc
130119
brief: 'Tech-specific attributes for Connect RPC.'
131120
attributes:
132121
- ref: rpc.connect_rpc.error_code
133-
tag: connect_rpc-tech-specific
134122
requirement_level:
135123
conditionally_required: If response is not successful and if error code available.
136124
- ref: rpc.connect_rpc.request.metadata
137-
tag: connect_rpc-tech-specific
138125
requirement_level: opt_in
139126
- ref: rpc.connect_rpc.response.metadata
140-
tag: connect_rpc-tech-specific
141127
requirement_level: opt_in

0 commit comments

Comments
 (0)