Skip to content

Commit 35639b2

Browse files
SylvainJugebasepi
andauthored
span type/subtype: alignment step 1 (#513)
* update spec + add app/internal * deprecate few values * Apply suggestions from code review Co-authored-by: Colton Myers <colton.myers@gmail.com> * use 'type.subtype' notation for deprecated values * clarify wording for potentially breaking changes Co-authored-by: Colton Myers <colton.myers@gmail.com>
1 parent 34f54c7 commit 35639b2

2 files changed

Lines changed: 26 additions & 9 deletions

File tree

specs/agents/tracing-spans.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ Spans will also have a `transaction_id`, which is the `id` of the current
1212
transaction. While not necessary for distributed tracing, this inclusion allows
1313
for simpler and more performant UI queries.
1414

15+
### Transaction and Span type and subtype fields
16+
17+
Each transaction has a `type` field, each span has both `type` and `subtype` fields.
18+
The values for each of those fields is protocol-specific and defined in the respective instrumentation specification
19+
for each protocol.
20+
21+
For spans, the type/subtype must fit the [span type specification in JSON format](../../tests/agents/json-specs/span_types.json).
22+
In order to help align all agents on this specification, changing `type` and `subtype` field values is not considered
23+
to be a _breaking change_, but rather a _potentially breaking change_ if for example existing users rely on values to
24+
build visualizations. As a consequence, modification of those values is not limited to major versions.
25+
1526
### Span outcome
1627

1728
The `outcome` property denotes whether the span represents a success or failure, it is used to compute error rates

tests/agents/json-specs/span_types.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,37 @@
2020
"java"
2121
]
2222
},
23+
"internal": {
24+
"__description": "Application generic internal span for controller/handler/processing delegation",
25+
"__used_by": [
26+
]
27+
},
2328
"controller": {
24-
"__description": "Application controller actions",
29+
"__description": "Deprecated: use app.internal instead",
2530
"__used_by": [
2631
"ruby"
2732
]
2833
},
2934
"graphql": {
30-
"__description": "Incoming GraphQL requests",
35+
"__description": "Deprecated: use app.internal instead",
3136
"__used_by": [
3237
"ruby"
3338
]
3439
},
3540
"mailer": {
36-
"__description": "Application mailer actions",
41+
"__description": "Deprecated: use app.internal instead",
3742
"__used_by": [
3843
"ruby"
3944
]
4045
},
4146
"resource": {
42-
"__description": "Application resource actions",
47+
"__description": "Deprecated: use app.internal instead",
4348
"__used_by": [
4449
"ruby"
4550
]
4651
},
4752
"handler": {
48-
"__description": "Application handler",
53+
"__description": "Deprecated: use app.internal instead",
4954
"__used_by": [
5055
"java"
5156
]
@@ -141,7 +146,8 @@
141146
"mssql": {
142147
"__description": "Microsoft SQL Server",
143148
"__used_by": [
144-
"nodejs"
149+
"nodejs",
150+
"java"
145151
]
146152
},
147153
"mysql": {
@@ -177,13 +183,13 @@
177183
]
178184
},
179185
"sqlite3": {
180-
"__description": "SQLite 3",
186+
"__description": "Deprecated: use db/sqlite",
181187
"__used_by": [
182188
"ruby"
183189
]
184190
},
185191
"sqlserver": {
186-
"__description": "Microsoft SQL Server",
192+
"__description": "Deprecated: use db/mssql",
187193
"__used_by": [
188194
"java"
189195
]
@@ -223,7 +229,7 @@
223229
}
224230
},
225231
"json": {
226-
"__description": "JSON parsing and generation",
232+
"__description": "Deprecated: use app.internal instead",
227233
"subtypes": {
228234
"parse": {
229235
"__description": "JSON parsing"

0 commit comments

Comments
 (0)