Skip to content

Commit cad5216

Browse files
SylvainJugemikker
andauthored
Add shared spec for span type/subtype (#443)
* add markdown table + json spec * dispatch type/subtype to relevant specs * add few java types + allow for optional subtype * comment -> __description * post Eyal review * add 'used-by' to help future alignment changes * Add Ruby details to spec * Update span_types.json * add few entries for nodejs * add few extra descriptions Co-authored-by: Mikkel Malmberg <[email protected]>
1 parent 44fff0c commit cad5216

File tree

2 files changed

+331
-1
lines changed

2 files changed

+331
-1
lines changed

specs/agents/tracing-instrumentation-messaging.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,18 @@ polling spans, where we want to capture such as well).
2828
- `transaction.type`: `messaging`
2929
- Spans:
3030
- `span.type`: `messaging`
31-
- `span.subtype`: the name of the framework - e.g. `jms`, `kafka`, `rabbitmq`
31+
- `span.subtype`: depends on service/provider, see table below
3232
- `span.action`: `send`, `receive` or `poll`
33+
34+
| `subtype` | Description |
35+
| ------------------- | --------------------------------- |
36+
| `azurequeue` | Azure Queue |
37+
| `azureservicebus` | Azure Service Bus |
38+
| `jms` | Java Messaging Service |
39+
| `kafka` | Apache Kafka |
40+
| `rabbitmq` | RabbitMQ |
41+
| `sns` | AWS Simple Notification Service |
42+
| `sqs` | AWS Simple Queue Service |
3343

3444
### Naming
3545

Lines changed: 320 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,320 @@
1+
{
2+
"__description": {
3+
"<type>": "root element for type identified by '<type>'",
4+
"<type>.__description": "description for '<type>' (optional)",
5+
"<type>.__used_by": "list of agents that use '<type>' to help document alignment (optional)",
6+
"<type>.allow_null_subtype": "true to allow null subtype, false by default if omitted",
7+
"<type>.allow_unlisted_subtype": "true to allow unlisted subtypes, false by default if omitted",
8+
"<type>.subtypes": "root element for sub-types of type '<type>', if omitted or empty subtype must be null, unless 'allow_unlisted_subtype' is set to true",
9+
"<type>.subtypes.<subtype>": "sub-type element for <subtype>",
10+
"<type>.subtypes.<subtype>.__description": "description of <subtype> subtype (optional)",
11+
"<type>.subtypes.<subtype>.__used_by": "list of agents that use <subtype> to help document alignment (optional)"
12+
},
13+
"app": {
14+
"__description": "Spans within application (usually not calling an external system)",
15+
"allow_null_subtype": true,
16+
"subtypes": {
17+
"inferred": {
18+
"__description": "Sampling profiler inferred spans",
19+
"__used_by": [
20+
"java"
21+
]
22+
},
23+
"controller": {
24+
"__description": "Application controller actions",
25+
"__used_by": [
26+
"ruby"
27+
]
28+
},
29+
"graphql": {
30+
"__description": "Incoming GraphQL requests",
31+
"__used_by": [
32+
"ruby"
33+
]
34+
},
35+
"mailer": {
36+
"__description": "Application mailer actions",
37+
"__used_by": [
38+
"ruby"
39+
]
40+
},
41+
"resource": {
42+
"__description": "Application resource actions",
43+
"__used_by": [
44+
"ruby"
45+
]
46+
}
47+
}
48+
},
49+
"custom": {
50+
"__description": "API custom instrumentation",
51+
"__used_by": [
52+
"java",
53+
"ruby"
54+
],
55+
"allow_null_subtype": true
56+
},
57+
"db": {
58+
"__description": "database span",
59+
"subtypes": {
60+
"cassandra": {
61+
"__description": "Cassandra",
62+
"__used_by": [
63+
"java"
64+
]
65+
},
66+
"cosmosdb": {
67+
"__description": "Azure CosmosDB"
68+
},
69+
"db2": {
70+
"__description": "IBM DB2",
71+
"__used_by": [
72+
"java"
73+
]
74+
},
75+
"derby": {
76+
"__description": "Apache Derby",
77+
"__used_by": [
78+
"java"
79+
]
80+
},
81+
"dynamodb": {
82+
"__description": "AWS DynamoDB",
83+
"__used_by": [
84+
"ruby"
85+
]
86+
},
87+
"elasticsearch": {
88+
"__description": "Elasticsearch",
89+
"__used_by": [
90+
"java",
91+
"ruby"
92+
]
93+
},
94+
"graphql": {
95+
"__description": "GraphQL",
96+
"__used_by": [
97+
"nodejs"
98+
]
99+
},
100+
"h2": {
101+
"__description": "H2",
102+
"__used_by": [
103+
"java"
104+
]
105+
},
106+
"hsqldb": {
107+
"__description": "HSQLDB",
108+
"__used_by": [
109+
"java"
110+
]
111+
},
112+
"ingres": {
113+
"__description": "Ingres"
114+
},
115+
"mariadb": {
116+
"__description": "MariaDB",
117+
"__used_by": [
118+
"java",
119+
"ruby"
120+
]
121+
},
122+
"memcached": {
123+
"__description": "Memcached",
124+
"__used_by": [
125+
"nodejs"
126+
]
127+
},
128+
"mongodb": {
129+
"__description": "MongoDB",
130+
"__used_by": [
131+
"java",
132+
"ruby"
133+
]
134+
},
135+
"mssql": {
136+
"__description": "Microsoft SQL Server",
137+
"__used_by": [
138+
"nodejs"
139+
]
140+
},
141+
"mysql": {
142+
"__description": "MySQL",
143+
"__used_by": [
144+
"java",
145+
"ruby"
146+
]
147+
},
148+
"oracle": {
149+
"__description": "Oracle Database",
150+
"__used_by": [
151+
"java"
152+
]
153+
},
154+
"postgresql": {
155+
"__description": "PostgreSQL",
156+
"__used_by": [
157+
"ruby"
158+
]
159+
},
160+
"redis": {
161+
"__description": "Redis",
162+
"__used_by": [
163+
"java",
164+
"ruby"
165+
]
166+
},
167+
"sqlite": {
168+
"__description": "SQLite",
169+
"__used_by": [
170+
"ruby"
171+
]
172+
},
173+
"sqlite3": {
174+
"__description": "SQLite 3",
175+
"__used_by": [
176+
"ruby"
177+
]
178+
},
179+
"sqlserver": {
180+
"__description": "Microsoft SQL Server",
181+
"__used_by": [
182+
"java"
183+
]
184+
},
185+
"unknown": {
186+
"__description": "Unknown database",
187+
"__used_by": [
188+
"java",
189+
"ruby"
190+
]
191+
}
192+
}
193+
},
194+
"external": {
195+
"__description": "Request to external service, usually in request/response pattern",
196+
"subtypes": {
197+
"dubbo": {
198+
"__description": "Apache Dubbo",
199+
"__used_by": [
200+
"java"
201+
]
202+
},
203+
"grpc": {
204+
"__description": "gRPC",
205+
"__used_by": [
206+
"ruby",
207+
"java"
208+
]
209+
},
210+
"http": {
211+
"__description": "HTTP client",
212+
"__used_by": [
213+
"ruby",
214+
"java"
215+
]
216+
}
217+
}
218+
},
219+
"json": {
220+
"__description": "JSON parsing and generation",
221+
"subtypes": {
222+
"parse": {
223+
"__description": "JSON parsing"
224+
},
225+
"generate": {
226+
"__description": "JSON generation"
227+
}
228+
},
229+
"__used_by": [
230+
"ruby"
231+
]
232+
},
233+
"messaging": {
234+
"__description": "Messaging",
235+
"subtypes": {
236+
"azurequeue": {
237+
"__description": "Azure Queue"
238+
},
239+
"azureservicebus": {
240+
"__description": "Azure Service Bus"
241+
},
242+
"jms": {
243+
"__description": "Java Messaging Service",
244+
"__used_by": [
245+
"java"
246+
]
247+
},
248+
"kafka": {
249+
"__description": "Apache Kafka",
250+
"__used_by": [
251+
"java"
252+
]
253+
},
254+
"rabbitmq": {
255+
"__description": "RabbitMQ",
256+
"__used_by": [
257+
"java"
258+
]
259+
},
260+
"sns": {
261+
"__description": "AWS Simple Notification Service",
262+
"__used_by": [
263+
"ruby"
264+
]
265+
},
266+
"sqs": {
267+
"__description": "AWS Simple Queue Service",
268+
"__used_by": [
269+
"ruby"
270+
]
271+
}
272+
}
273+
},
274+
"process": {
275+
"__description": "External process",
276+
"__used_by": [
277+
"java"
278+
]
279+
},
280+
"storage": {
281+
"subtypes": {
282+
"azureblob": {
283+
"__description": "Azure Blob Storage"
284+
},
285+
"azurefile": {
286+
"__description": "Azure Files"
287+
},
288+
"azuretable": {
289+
"__description": "Azure Storage Table",
290+
"__used_by": [
291+
"ruby"
292+
]
293+
},
294+
"s3": {
295+
"__description": "AWS S3",
296+
"__used_by": [
297+
"ruby"
298+
]
299+
}
300+
}
301+
},
302+
"template": {
303+
"__description": "Template engines (no sub-type for now as really platform-specific)",
304+
"__used_by": [
305+
"java",
306+
"ruby"
307+
],
308+
"allow_unlisted_subtype": true
309+
},
310+
"websocket": {
311+
"__description": "Websockets",
312+
"subtypes": {
313+
"send": {
314+
"__used_by": [
315+
"nodejs"
316+
]
317+
}
318+
}
319+
}
320+
}

0 commit comments

Comments
 (0)