@twin.org/tracing-service 0.9.2-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +21 -0
- package/dist/es/index.js +7 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/ITracingServiceConstructorOptions.js +4 -0
- package/dist/es/models/ITracingServiceConstructorOptions.js.map +1 -0
- package/dist/es/restEntryPoints.js +13 -0
- package/dist/es/restEntryPoints.js.map +1 -0
- package/dist/es/tracingRoutes.js +298 -0
- package/dist/es/tracingRoutes.js.map +1 -0
- package/dist/es/tracingService.js +147 -0
- package/dist/es/tracingService.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/models/ITracingServiceConstructorOptions.d.ts +10 -0
- package/dist/types/restEntryPoints.d.ts +5 -0
- package/dist/types/tracingRoutes.d.ts +45 -0
- package/dist/types/tracingService.d.ts +72 -0
- package/docs/changelog.md +25 -0
- package/docs/examples.md +37 -0
- package/docs/open-api/spec.json +847 -0
- package/docs/reference/classes/TracingService.md +224 -0
- package/docs/reference/functions/generateRestRoutesTracing.md +25 -0
- package/docs/reference/functions/tracingGetTrace.md +31 -0
- package/docs/reference/functions/tracingList.md +31 -0
- package/docs/reference/functions/tracingSpanEnd.md +31 -0
- package/docs/reference/functions/tracingSpanStart.md +31 -0
- package/docs/reference/index.md +22 -0
- package/docs/reference/interfaces/ITracingServiceConstructorOptions.md +17 -0
- package/docs/reference/variables/restEntryPoints.md +5 -0
- package/docs/reference/variables/tagsTracing.md +5 -0
- package/locales/en.json +7 -0
- package/package.json +55 -0
|
@@ -0,0 +1,847 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "TWIN - Tracing Endpoints",
|
|
5
|
+
"description": "REST API for TWIN - Tracing Endpoints.",
|
|
6
|
+
"version": "1.0.0",
|
|
7
|
+
"license": {
|
|
8
|
+
"name": "Apache 2.0 License",
|
|
9
|
+
"url": "https://opensource.org/licenses/Apache-2.0"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"servers": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://localhost"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"tags": [
|
|
18
|
+
{
|
|
19
|
+
"name": "Tracing",
|
|
20
|
+
"description": "Endpoints which are modelled to access a tracing contract."
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"paths": {
|
|
24
|
+
"/tracing": {
|
|
25
|
+
"post": {
|
|
26
|
+
"operationId": "tracingSpanStart",
|
|
27
|
+
"summary": "Start a span",
|
|
28
|
+
"tags": [
|
|
29
|
+
"Tracing"
|
|
30
|
+
],
|
|
31
|
+
"security": [
|
|
32
|
+
{
|
|
33
|
+
"jwtBearerAuthScheme": []
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"requestBody": {
|
|
37
|
+
"description": "Start a new span.",
|
|
38
|
+
"required": true,
|
|
39
|
+
"content": {
|
|
40
|
+
"application/json": {
|
|
41
|
+
"schema": {
|
|
42
|
+
"$ref": "#/components/schemas/TracingSpanStartRequest"
|
|
43
|
+
},
|
|
44
|
+
"examples": {
|
|
45
|
+
"tracingSpanStartRequestExample": {
|
|
46
|
+
"value": {
|
|
47
|
+
"name": "process-order",
|
|
48
|
+
"options": {
|
|
49
|
+
"kind": "internal"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"responses": {
|
|
58
|
+
"200": {
|
|
59
|
+
"description": "Response for starting a span.",
|
|
60
|
+
"content": {
|
|
61
|
+
"application/json": {
|
|
62
|
+
"schema": {
|
|
63
|
+
"$ref": "#/components/schemas/Span"
|
|
64
|
+
},
|
|
65
|
+
"examples": {
|
|
66
|
+
"tracingSpanStartResponseExample": {
|
|
67
|
+
"value": {
|
|
68
|
+
"name": "process-order",
|
|
69
|
+
"kind": "internal",
|
|
70
|
+
"status": "unset",
|
|
71
|
+
"context": {
|
|
72
|
+
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
|
|
73
|
+
"spanId": "00f067aa0ba902b7",
|
|
74
|
+
"traceFlags": 1
|
|
75
|
+
},
|
|
76
|
+
"startTs": 1715252922273
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"400": {
|
|
84
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
85
|
+
"content": {
|
|
86
|
+
"application/json": {
|
|
87
|
+
"schema": {
|
|
88
|
+
"$ref": "#/components/schemas/Error"
|
|
89
|
+
},
|
|
90
|
+
"examples": {
|
|
91
|
+
"exampleResponse": {
|
|
92
|
+
"value": {
|
|
93
|
+
"name": "GeneralError",
|
|
94
|
+
"message": "errorMessage",
|
|
95
|
+
"properties": {
|
|
96
|
+
"foo": "bar"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"401": {
|
|
105
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
106
|
+
"content": {
|
|
107
|
+
"application/json": {
|
|
108
|
+
"schema": {
|
|
109
|
+
"$ref": "#/components/schemas/Error"
|
|
110
|
+
},
|
|
111
|
+
"examples": {
|
|
112
|
+
"exampleResponse": {
|
|
113
|
+
"value": {
|
|
114
|
+
"name": "UnauthorizedError",
|
|
115
|
+
"message": "errorMessage"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"500": {
|
|
123
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
124
|
+
"content": {
|
|
125
|
+
"application/json": {
|
|
126
|
+
"schema": {
|
|
127
|
+
"$ref": "#/components/schemas/Error"
|
|
128
|
+
},
|
|
129
|
+
"examples": {
|
|
130
|
+
"exampleResponse": {
|
|
131
|
+
"value": {
|
|
132
|
+
"name": "InternalServerError",
|
|
133
|
+
"message": "errorMessage"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"get": {
|
|
143
|
+
"operationId": "tracingListSpans",
|
|
144
|
+
"summary": "Get a list of the spans",
|
|
145
|
+
"tags": [
|
|
146
|
+
"Tracing"
|
|
147
|
+
],
|
|
148
|
+
"parameters": [
|
|
149
|
+
{
|
|
150
|
+
"name": "traceId",
|
|
151
|
+
"description": "The id of the trace to filter by.",
|
|
152
|
+
"in": "query",
|
|
153
|
+
"required": false,
|
|
154
|
+
"schema": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"example": "4bf92f3577b34da6a3ce929d0e0e4736"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "spanId",
|
|
161
|
+
"description": "The id of the span to filter by.",
|
|
162
|
+
"in": "query",
|
|
163
|
+
"required": false,
|
|
164
|
+
"schema": {
|
|
165
|
+
"type": "string"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "status",
|
|
170
|
+
"description": "The status to filter by.",
|
|
171
|
+
"in": "query",
|
|
172
|
+
"required": false,
|
|
173
|
+
"schema": {
|
|
174
|
+
"$ref": "#/components/schemas/SpanStatus"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "kind",
|
|
179
|
+
"description": "The kind to filter by.",
|
|
180
|
+
"in": "query",
|
|
181
|
+
"required": false,
|
|
182
|
+
"schema": {
|
|
183
|
+
"$ref": "#/components/schemas/SpanKind"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"name": "timeStart",
|
|
188
|
+
"description": "The inclusive start time to filter the span start by, as a timestamp in ms.",
|
|
189
|
+
"in": "query",
|
|
190
|
+
"required": false,
|
|
191
|
+
"schema": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "timeEnd",
|
|
197
|
+
"description": "The inclusive end time to filter the span start by, as a timestamp in ms.",
|
|
198
|
+
"in": "query",
|
|
199
|
+
"required": false,
|
|
200
|
+
"schema": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "cursor",
|
|
206
|
+
"description": "The optional cursor to get next chunk.",
|
|
207
|
+
"in": "query",
|
|
208
|
+
"required": false,
|
|
209
|
+
"schema": {
|
|
210
|
+
"type": "string"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "limit",
|
|
215
|
+
"description": "Limit the number of entities to return.",
|
|
216
|
+
"in": "query",
|
|
217
|
+
"required": false,
|
|
218
|
+
"schema": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"security": [
|
|
224
|
+
{
|
|
225
|
+
"jwtBearerAuthScheme": []
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"responses": {
|
|
229
|
+
"200": {
|
|
230
|
+
"description": "Response for span list request.",
|
|
231
|
+
"content": {
|
|
232
|
+
"application/json": {
|
|
233
|
+
"schema": {
|
|
234
|
+
"$ref": "#/components/schemas/TracingListResponse"
|
|
235
|
+
},
|
|
236
|
+
"examples": {
|
|
237
|
+
"tracingListResponseExample": {
|
|
238
|
+
"value": {
|
|
239
|
+
"entities": [
|
|
240
|
+
{
|
|
241
|
+
"name": "process-order",
|
|
242
|
+
"kind": "internal",
|
|
243
|
+
"status": "ok",
|
|
244
|
+
"context": {
|
|
245
|
+
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
|
|
246
|
+
"spanId": "00f067aa0ba902b7",
|
|
247
|
+
"traceFlags": 1
|
|
248
|
+
},
|
|
249
|
+
"startTs": 1715252922273,
|
|
250
|
+
"endTs": 1715252922512,
|
|
251
|
+
"durationMs": 239
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"cursor": "1"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"400": {
|
|
262
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
263
|
+
"content": {
|
|
264
|
+
"application/json": {
|
|
265
|
+
"schema": {
|
|
266
|
+
"$ref": "#/components/schemas/Error"
|
|
267
|
+
},
|
|
268
|
+
"examples": {
|
|
269
|
+
"exampleResponse": {
|
|
270
|
+
"value": {
|
|
271
|
+
"name": "GeneralError",
|
|
272
|
+
"message": "errorMessage",
|
|
273
|
+
"properties": {
|
|
274
|
+
"foo": "bar"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"401": {
|
|
283
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
284
|
+
"content": {
|
|
285
|
+
"application/json": {
|
|
286
|
+
"schema": {
|
|
287
|
+
"$ref": "#/components/schemas/Error"
|
|
288
|
+
},
|
|
289
|
+
"examples": {
|
|
290
|
+
"exampleResponse": {
|
|
291
|
+
"value": {
|
|
292
|
+
"name": "UnauthorizedError",
|
|
293
|
+
"message": "errorMessage"
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"500": {
|
|
301
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
302
|
+
"content": {
|
|
303
|
+
"application/json": {
|
|
304
|
+
"schema": {
|
|
305
|
+
"$ref": "#/components/schemas/Error"
|
|
306
|
+
},
|
|
307
|
+
"examples": {
|
|
308
|
+
"exampleResponse": {
|
|
309
|
+
"value": {
|
|
310
|
+
"name": "InternalServerError",
|
|
311
|
+
"message": "errorMessage"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"/tracing/{spanId}": {
|
|
322
|
+
"put": {
|
|
323
|
+
"operationId": "tracingSpanEnd",
|
|
324
|
+
"summary": "End a span",
|
|
325
|
+
"tags": [
|
|
326
|
+
"Tracing"
|
|
327
|
+
],
|
|
328
|
+
"parameters": [
|
|
329
|
+
{
|
|
330
|
+
"name": "spanId",
|
|
331
|
+
"description": "The id of the span to end.",
|
|
332
|
+
"in": "path",
|
|
333
|
+
"required": true,
|
|
334
|
+
"schema": {
|
|
335
|
+
"type": "string"
|
|
336
|
+
},
|
|
337
|
+
"style": "simple",
|
|
338
|
+
"example": "00f067aa0ba902b7"
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"security": [
|
|
342
|
+
{
|
|
343
|
+
"jwtBearerAuthScheme": []
|
|
344
|
+
}
|
|
345
|
+
],
|
|
346
|
+
"requestBody": {
|
|
347
|
+
"description": "End a span, finalizing its status and duration.",
|
|
348
|
+
"required": true,
|
|
349
|
+
"content": {
|
|
350
|
+
"application/json": {
|
|
351
|
+
"schema": {
|
|
352
|
+
"$ref": "#/components/schemas/Span"
|
|
353
|
+
},
|
|
354
|
+
"examples": {
|
|
355
|
+
"tracingSpanEndRequestExample": {
|
|
356
|
+
"value": {
|
|
357
|
+
"name": "process-order",
|
|
358
|
+
"kind": "internal",
|
|
359
|
+
"status": "ok",
|
|
360
|
+
"context": {
|
|
361
|
+
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
|
|
362
|
+
"spanId": "00f067aa0ba902b7",
|
|
363
|
+
"traceFlags": 1
|
|
364
|
+
},
|
|
365
|
+
"startTs": 1715252922273,
|
|
366
|
+
"endTs": 1715252922512,
|
|
367
|
+
"durationMs": 239
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"responses": {
|
|
375
|
+
"204": {
|
|
376
|
+
"description": "The rest request ended in success with no data."
|
|
377
|
+
},
|
|
378
|
+
"400": {
|
|
379
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
380
|
+
"content": {
|
|
381
|
+
"application/json": {
|
|
382
|
+
"schema": {
|
|
383
|
+
"$ref": "#/components/schemas/Error"
|
|
384
|
+
},
|
|
385
|
+
"examples": {
|
|
386
|
+
"exampleResponse": {
|
|
387
|
+
"value": {
|
|
388
|
+
"name": "GeneralError",
|
|
389
|
+
"message": "errorMessage",
|
|
390
|
+
"properties": {
|
|
391
|
+
"foo": "bar"
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"401": {
|
|
400
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
401
|
+
"content": {
|
|
402
|
+
"application/json": {
|
|
403
|
+
"schema": {
|
|
404
|
+
"$ref": "#/components/schemas/Error"
|
|
405
|
+
},
|
|
406
|
+
"examples": {
|
|
407
|
+
"exampleResponse": {
|
|
408
|
+
"value": {
|
|
409
|
+
"name": "UnauthorizedError",
|
|
410
|
+
"message": "errorMessage"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"500": {
|
|
418
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
419
|
+
"content": {
|
|
420
|
+
"application/json": {
|
|
421
|
+
"schema": {
|
|
422
|
+
"$ref": "#/components/schemas/Error"
|
|
423
|
+
},
|
|
424
|
+
"examples": {
|
|
425
|
+
"exampleResponse": {
|
|
426
|
+
"value": {
|
|
427
|
+
"name": "InternalServerError",
|
|
428
|
+
"message": "errorMessage"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"/tracing/trace/{traceId}": {
|
|
439
|
+
"get": {
|
|
440
|
+
"operationId": "tracingGetTrace",
|
|
441
|
+
"summary": "Get all the spans belonging to a trace",
|
|
442
|
+
"tags": [
|
|
443
|
+
"Tracing"
|
|
444
|
+
],
|
|
445
|
+
"parameters": [
|
|
446
|
+
{
|
|
447
|
+
"name": "traceId",
|
|
448
|
+
"description": "The id of the trace to retrieve.",
|
|
449
|
+
"in": "path",
|
|
450
|
+
"required": true,
|
|
451
|
+
"schema": {
|
|
452
|
+
"type": "string"
|
|
453
|
+
},
|
|
454
|
+
"style": "simple",
|
|
455
|
+
"example": "4bf92f3577b34da6a3ce929d0e0e4736"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"security": [
|
|
459
|
+
{
|
|
460
|
+
"jwtBearerAuthScheme": []
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"responses": {
|
|
464
|
+
"200": {
|
|
465
|
+
"description": "Response for a get trace request.",
|
|
466
|
+
"content": {
|
|
467
|
+
"application/json": {
|
|
468
|
+
"schema": {
|
|
469
|
+
"$ref": "#/components/schemas/TracingGetTraceResponse"
|
|
470
|
+
},
|
|
471
|
+
"examples": {
|
|
472
|
+
"tracingGetTraceResponseExample": {
|
|
473
|
+
"value": {
|
|
474
|
+
"spans": [
|
|
475
|
+
{
|
|
476
|
+
"name": "process-order",
|
|
477
|
+
"kind": "internal",
|
|
478
|
+
"status": "ok",
|
|
479
|
+
"context": {
|
|
480
|
+
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
|
|
481
|
+
"spanId": "00f067aa0ba902b7",
|
|
482
|
+
"traceFlags": 1
|
|
483
|
+
},
|
|
484
|
+
"startTs": 1715252922273,
|
|
485
|
+
"endTs": 1715252922512,
|
|
486
|
+
"durationMs": 239
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"400": {
|
|
496
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
497
|
+
"content": {
|
|
498
|
+
"application/json": {
|
|
499
|
+
"schema": {
|
|
500
|
+
"$ref": "#/components/schemas/Error"
|
|
501
|
+
},
|
|
502
|
+
"examples": {
|
|
503
|
+
"exampleResponse": {
|
|
504
|
+
"value": {
|
|
505
|
+
"name": "GeneralError",
|
|
506
|
+
"message": "errorMessage",
|
|
507
|
+
"properties": {
|
|
508
|
+
"foo": "bar"
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"401": {
|
|
517
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
518
|
+
"content": {
|
|
519
|
+
"application/json": {
|
|
520
|
+
"schema": {
|
|
521
|
+
"$ref": "#/components/schemas/Error"
|
|
522
|
+
},
|
|
523
|
+
"examples": {
|
|
524
|
+
"exampleResponse": {
|
|
525
|
+
"value": {
|
|
526
|
+
"name": "UnauthorizedError",
|
|
527
|
+
"message": "errorMessage"
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"500": {
|
|
535
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
536
|
+
"content": {
|
|
537
|
+
"application/json": {
|
|
538
|
+
"schema": {
|
|
539
|
+
"$ref": "#/components/schemas/Error"
|
|
540
|
+
},
|
|
541
|
+
"examples": {
|
|
542
|
+
"exampleResponse": {
|
|
543
|
+
"value": {
|
|
544
|
+
"name": "InternalServerError",
|
|
545
|
+
"message": "errorMessage"
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
"components": {
|
|
557
|
+
"schemas": {
|
|
558
|
+
"Error": {
|
|
559
|
+
"description": "Model to describe serialized error.",
|
|
560
|
+
"type": "object",
|
|
561
|
+
"properties": {
|
|
562
|
+
"name": {
|
|
563
|
+
"type": "string",
|
|
564
|
+
"description": "The name for the error."
|
|
565
|
+
},
|
|
566
|
+
"message": {
|
|
567
|
+
"type": "string",
|
|
568
|
+
"description": "The message for the error as an i18n key."
|
|
569
|
+
},
|
|
570
|
+
"source": {
|
|
571
|
+
"type": "string",
|
|
572
|
+
"description": "The source of the error."
|
|
573
|
+
},
|
|
574
|
+
"properties": {
|
|
575
|
+
"type": "object",
|
|
576
|
+
"additionalProperties": {},
|
|
577
|
+
"description": "Any additional information for the error."
|
|
578
|
+
},
|
|
579
|
+
"stack": {
|
|
580
|
+
"type": "string",
|
|
581
|
+
"description": "The stack trace for the error."
|
|
582
|
+
},
|
|
583
|
+
"cause": {
|
|
584
|
+
"$ref": "#/components/schemas/Error"
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
"required": [
|
|
588
|
+
"name",
|
|
589
|
+
"message"
|
|
590
|
+
]
|
|
591
|
+
},
|
|
592
|
+
"Span": {
|
|
593
|
+
"description": "A span representing a timed unit of work within a trace.",
|
|
594
|
+
"type": "object",
|
|
595
|
+
"properties": {
|
|
596
|
+
"name": {
|
|
597
|
+
"type": "string",
|
|
598
|
+
"description": "The name of the span, should be a stable low-cardinality label."
|
|
599
|
+
},
|
|
600
|
+
"kind": {
|
|
601
|
+
"$ref": "#/components/schemas/SpanKind"
|
|
602
|
+
},
|
|
603
|
+
"status": {
|
|
604
|
+
"$ref": "#/components/schemas/SpanStatus"
|
|
605
|
+
},
|
|
606
|
+
"context": {
|
|
607
|
+
"$ref": "#/components/schemas/SpanContext"
|
|
608
|
+
},
|
|
609
|
+
"parentSpanId": {
|
|
610
|
+
"type": "string",
|
|
611
|
+
"description": "The id of the parent span, when the span is not the root of the trace."
|
|
612
|
+
},
|
|
613
|
+
"startTs": {
|
|
614
|
+
"type": "number",
|
|
615
|
+
"description": "The time the span started as milliseconds since the epoch."
|
|
616
|
+
},
|
|
617
|
+
"endTs": {
|
|
618
|
+
"type": "number",
|
|
619
|
+
"description": "The time the span ended as milliseconds since the epoch, undefined while the span is in-flight."
|
|
620
|
+
},
|
|
621
|
+
"durationMs": {
|
|
622
|
+
"type": "number",
|
|
623
|
+
"description": "The duration of the span in milliseconds, populated when the span ends."
|
|
624
|
+
},
|
|
625
|
+
"attributes": {
|
|
626
|
+
"type": "object",
|
|
627
|
+
"additionalProperties": {},
|
|
628
|
+
"description": "The key-value attributes describing the span."
|
|
629
|
+
},
|
|
630
|
+
"events": {
|
|
631
|
+
"type": "array",
|
|
632
|
+
"items": {
|
|
633
|
+
"$ref": "#/components/schemas/SpanEvent"
|
|
634
|
+
},
|
|
635
|
+
"description": "The events recorded within the span."
|
|
636
|
+
},
|
|
637
|
+
"links": {
|
|
638
|
+
"type": "array",
|
|
639
|
+
"items": {
|
|
640
|
+
"$ref": "#/components/schemas/SpanLink"
|
|
641
|
+
},
|
|
642
|
+
"description": "The links to other spans."
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
"required": [
|
|
646
|
+
"name",
|
|
647
|
+
"kind",
|
|
648
|
+
"status",
|
|
649
|
+
"context",
|
|
650
|
+
"startTs"
|
|
651
|
+
]
|
|
652
|
+
},
|
|
653
|
+
"SpanContext": {
|
|
654
|
+
"description": "The context which uniquely identifies a span within a trace, following the W3C Trace Context format.",
|
|
655
|
+
"type": "object",
|
|
656
|
+
"properties": {
|
|
657
|
+
"traceId": {
|
|
658
|
+
"type": "string",
|
|
659
|
+
"description": "The id of the trace the span belongs to, as a 16 byte hex string."
|
|
660
|
+
},
|
|
661
|
+
"spanId": {
|
|
662
|
+
"type": "string",
|
|
663
|
+
"description": "The id of the span, as an 8 byte hex string."
|
|
664
|
+
},
|
|
665
|
+
"traceFlags": {
|
|
666
|
+
"type": "number",
|
|
667
|
+
"description": "The trace flags bitfield, where the least significant bit indicates the span is sampled."
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
"required": [
|
|
671
|
+
"traceId",
|
|
672
|
+
"spanId",
|
|
673
|
+
"traceFlags"
|
|
674
|
+
]
|
|
675
|
+
},
|
|
676
|
+
"SpanEvent": {
|
|
677
|
+
"description": "A timestamped annotation recorded within a span to mark a milestone.",
|
|
678
|
+
"type": "object",
|
|
679
|
+
"properties": {
|
|
680
|
+
"name": {
|
|
681
|
+
"type": "string",
|
|
682
|
+
"description": "The name of the event."
|
|
683
|
+
},
|
|
684
|
+
"ts": {
|
|
685
|
+
"type": "number",
|
|
686
|
+
"description": "The timestamp of the event as milliseconds since the epoch."
|
|
687
|
+
},
|
|
688
|
+
"attributes": {
|
|
689
|
+
"type": "object",
|
|
690
|
+
"additionalProperties": {},
|
|
691
|
+
"description": "The optional attributes associated with the event."
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
"required": [
|
|
695
|
+
"name",
|
|
696
|
+
"ts"
|
|
697
|
+
]
|
|
698
|
+
},
|
|
699
|
+
"SpanKind": {
|
|
700
|
+
"description": "The kind of span, describing the role the operation plays in the overall flow.",
|
|
701
|
+
"anyOf": [
|
|
702
|
+
{
|
|
703
|
+
"const": "internal",
|
|
704
|
+
"description": "A span representing pure in-process work."
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"const": "client",
|
|
708
|
+
"description": "A span representing an outbound request to another service or dependency."
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"const": "server",
|
|
712
|
+
"description": "A span representing the handling of an inbound request."
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"const": "producer",
|
|
716
|
+
"description": "A span representing the publishing of a message to a broker or queue."
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"const": "consumer",
|
|
720
|
+
"description": "A span representing the processing of a message from a broker or queue."
|
|
721
|
+
}
|
|
722
|
+
]
|
|
723
|
+
},
|
|
724
|
+
"SpanLink": {
|
|
725
|
+
"description": "A causal reference from one span to another span, which may belong to a different trace.",
|
|
726
|
+
"type": "object",
|
|
727
|
+
"properties": {
|
|
728
|
+
"context": {
|
|
729
|
+
"$ref": "#/components/schemas/SpanContext"
|
|
730
|
+
},
|
|
731
|
+
"attributes": {
|
|
732
|
+
"type": "object",
|
|
733
|
+
"additionalProperties": {},
|
|
734
|
+
"description": "The optional attributes describing the link."
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
"required": [
|
|
738
|
+
"context"
|
|
739
|
+
]
|
|
740
|
+
},
|
|
741
|
+
"SpanOptions": {
|
|
742
|
+
"description": "The options used when starting a span.",
|
|
743
|
+
"type": "object",
|
|
744
|
+
"properties": {
|
|
745
|
+
"kind": {
|
|
746
|
+
"$ref": "#/components/schemas/SpanKind"
|
|
747
|
+
},
|
|
748
|
+
"parentContext": {
|
|
749
|
+
"$ref": "#/components/schemas/SpanContext"
|
|
750
|
+
},
|
|
751
|
+
"startTs": {
|
|
752
|
+
"type": "number",
|
|
753
|
+
"description": "The time the span started as milliseconds since the epoch, defaults to the current time."
|
|
754
|
+
},
|
|
755
|
+
"attributes": {
|
|
756
|
+
"type": "object",
|
|
757
|
+
"additionalProperties": {},
|
|
758
|
+
"description": "The key-value attributes to record on the span at creation."
|
|
759
|
+
},
|
|
760
|
+
"links": {
|
|
761
|
+
"type": "array",
|
|
762
|
+
"items": {
|
|
763
|
+
"$ref": "#/components/schemas/SpanLink"
|
|
764
|
+
},
|
|
765
|
+
"description": "The links to other spans to record on the span at creation."
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
"SpanStatus": {
|
|
770
|
+
"description": "The status of a span.",
|
|
771
|
+
"anyOf": [
|
|
772
|
+
{
|
|
773
|
+
"const": "unset",
|
|
774
|
+
"description": "The span has no explicit status, this is the default."
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"const": "ok",
|
|
778
|
+
"description": "The operation completed successfully."
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"const": "error",
|
|
782
|
+
"description": "The operation ended in an error."
|
|
783
|
+
}
|
|
784
|
+
]
|
|
785
|
+
},
|
|
786
|
+
"TracingGetTraceResponse": {
|
|
787
|
+
"type": "object",
|
|
788
|
+
"properties": {
|
|
789
|
+
"spans": {
|
|
790
|
+
"type": "array",
|
|
791
|
+
"items": {
|
|
792
|
+
"$ref": "#/components/schemas/Span"
|
|
793
|
+
},
|
|
794
|
+
"description": "The spans belonging to the trace, ordered by their start time ascending."
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
"required": [
|
|
798
|
+
"spans"
|
|
799
|
+
],
|
|
800
|
+
"description": "The response payload."
|
|
801
|
+
},
|
|
802
|
+
"TracingListResponse": {
|
|
803
|
+
"type": "object",
|
|
804
|
+
"properties": {
|
|
805
|
+
"entities": {
|
|
806
|
+
"type": "array",
|
|
807
|
+
"items": {
|
|
808
|
+
"$ref": "#/components/schemas/Span"
|
|
809
|
+
},
|
|
810
|
+
"description": "The spans matching the query conditions."
|
|
811
|
+
},
|
|
812
|
+
"cursor": {
|
|
813
|
+
"type": "string",
|
|
814
|
+
"description": "An optional cursor, when defined can be used to call query to get more entities."
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
"required": [
|
|
818
|
+
"entities"
|
|
819
|
+
],
|
|
820
|
+
"description": "The response payload."
|
|
821
|
+
},
|
|
822
|
+
"TracingSpanStartRequest": {
|
|
823
|
+
"type": "object",
|
|
824
|
+
"properties": {
|
|
825
|
+
"name": {
|
|
826
|
+
"type": "string",
|
|
827
|
+
"description": "The name of the span."
|
|
828
|
+
},
|
|
829
|
+
"options": {
|
|
830
|
+
"$ref": "#/components/schemas/SpanOptions"
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
"required": [
|
|
834
|
+
"name"
|
|
835
|
+
],
|
|
836
|
+
"description": "The data to be used to start the span."
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
"securitySchemes": {
|
|
840
|
+
"jwtBearerAuthScheme": {
|
|
841
|
+
"type": "http",
|
|
842
|
+
"scheme": "bearer",
|
|
843
|
+
"bearerFormat": "JWT"
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
}
|