@crvouga/mockingbird-service-otel 3.2.0 → 3.3.0
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/CHANGELOG.md +10 -4
- package/README.md +82 -9
- package/SUPPORT.md +6 -3
- package/dist/{chunk-CZKU2KT2.js → chunk-JZ6IVZNV.js} +44 -8
- package/dist/{chunk-CZKU2KT2.js.map → chunk-JZ6IVZNV.js.map} +2 -2
- package/dist/{chunk-HRGWNDT2.js → chunk-T4AU5UCQ.js} +180 -36
- package/dist/{chunk-HRGWNDT2.js.map → chunk-T4AU5UCQ.js.map} +4 -4
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +56 -13
- package/dist/index.js +3 -1
- package/dist/server.d.ts +42 -2
- package/dist/server.js +2 -2
- package/openapi.yaml +311 -6
- package/package.json +1 -1
package/openapi.yaml
CHANGED
|
@@ -5,6 +5,11 @@ info:
|
|
|
5
5
|
An OTLP/HTTP receiver (traces, logs, metrics; JSON and protobuf) in front of the
|
|
6
6
|
OpenObserve (O2) search API, over one store: a test emits a span or a structured `event`
|
|
7
7
|
log and queries it back with the same SQL our clients send.
|
|
8
|
+
|
|
9
|
+
The receiver authenticates exports the way the collector it stands in for does, chosen by
|
|
10
|
+
the `ingestAuth` setting: `bearer` (the default), `basic` (a hosted OTLP gateway's
|
|
11
|
+
`Authorization: Basic base64(instanceId:token)`) or `none` (a local collector). With
|
|
12
|
+
`cors.allowedOrigins` set it also answers a browser exporter's CORS preflight.
|
|
8
13
|
version: '1'
|
|
9
14
|
x-mockingbird-upstream:
|
|
10
15
|
note: OTLP/HTTP per opentelemetry-proto v1 (https://opentelemetry.io/docs/specs/otlp/); the O2 routes
|
|
@@ -19,6 +24,10 @@ paths:
|
|
|
19
24
|
post:
|
|
20
25
|
operationId: ExportTraces
|
|
21
26
|
summary: OTLP/HTTP trace export (ExportTraceServiceRequest)
|
|
27
|
+
security:
|
|
28
|
+
- bearerAuth: []
|
|
29
|
+
- basicAuth: []
|
|
30
|
+
- {}
|
|
22
31
|
x-mockingbird:
|
|
23
32
|
supported: true
|
|
24
33
|
parity:
|
|
@@ -38,6 +47,24 @@ paths:
|
|
|
38
47
|
'200':
|
|
39
48
|
description: 'Accepted. JSON requests get `{partialSuccess: {}}`; protobuf requests get an empty
|
|
40
49
|
protobuf response.'
|
|
50
|
+
headers:
|
|
51
|
+
access-control-allow-origin:
|
|
52
|
+
description: With CORS on, the request's `Origin` when it is allowed (`*` when any origin
|
|
53
|
+
is). Sent on every status, errors included.
|
|
54
|
+
schema:
|
|
55
|
+
type: string
|
|
56
|
+
access-control-allow-credentials:
|
|
57
|
+
description: '`true`, beside `access-control-allow-origin`'
|
|
58
|
+
schema:
|
|
59
|
+
type: string
|
|
60
|
+
access-control-expose-headers:
|
|
61
|
+
description: The configured `cors.exposedHeaders`
|
|
62
|
+
schema:
|
|
63
|
+
type: string
|
|
64
|
+
vary:
|
|
65
|
+
description: '`Origin`, whenever CORS is on'
|
|
66
|
+
schema:
|
|
67
|
+
type: string
|
|
41
68
|
content:
|
|
42
69
|
application/json:
|
|
43
70
|
schema:
|
|
@@ -47,17 +74,27 @@ paths:
|
|
|
47
74
|
type: string
|
|
48
75
|
format: binary
|
|
49
76
|
'400':
|
|
50
|
-
description: Undecodable payload
|
|
77
|
+
description: Undecodable payload. Like every receiver error it is a `google.rpc.Status` in
|
|
78
|
+
the request's encoding (binary for protobuf requests, JSON otherwise).
|
|
51
79
|
content:
|
|
52
80
|
application/json:
|
|
53
81
|
schema:
|
|
54
82
|
$ref: '#/components/schemas/RpcStatus'
|
|
83
|
+
application/x-protobuf:
|
|
84
|
+
schema:
|
|
85
|
+
type: string
|
|
86
|
+
format: binary
|
|
55
87
|
'401':
|
|
56
|
-
description:
|
|
88
|
+
description: 'Credentials missing or not accepted for the `ingestAuth` mode: a bearer token
|
|
89
|
+
(`bearer`, the default) or Basic credentials (`basic`). `none` mode refuses nothing.'
|
|
57
90
|
content:
|
|
58
91
|
application/json:
|
|
59
92
|
schema:
|
|
60
93
|
$ref: '#/components/schemas/RpcStatus'
|
|
94
|
+
application/x-protobuf:
|
|
95
|
+
schema:
|
|
96
|
+
type: string
|
|
97
|
+
format: binary
|
|
61
98
|
'415':
|
|
62
99
|
description: Neither application/json nor application/x-protobuf
|
|
63
100
|
content:
|
|
@@ -98,10 +135,82 @@ paths:
|
|
|
98
135
|
application/json:
|
|
99
136
|
schema:
|
|
100
137
|
$ref: '#/components/schemas/RpcStatus'
|
|
138
|
+
options:
|
|
139
|
+
operationId: PreflightTraces
|
|
140
|
+
summary: CORS preflight a browser exporter sends before `POST /v1/traces`
|
|
141
|
+
description: Answered only when `cors.allowedOrigins` is set, and before authentication (a preflight
|
|
142
|
+
carries no credentials). A refused preflight is the same 204 without the `access-control-allow-*`
|
|
143
|
+
headers.
|
|
144
|
+
security: []
|
|
145
|
+
x-mockingbird:
|
|
146
|
+
supported: true
|
|
147
|
+
parity:
|
|
148
|
+
enabled: true
|
|
149
|
+
safe: true
|
|
150
|
+
parameters:
|
|
151
|
+
- name: Origin
|
|
152
|
+
in: header
|
|
153
|
+
required: false
|
|
154
|
+
schema:
|
|
155
|
+
type: string
|
|
156
|
+
enum:
|
|
157
|
+
- https://app.example.test
|
|
158
|
+
- name: Access-Control-Request-Method
|
|
159
|
+
in: header
|
|
160
|
+
required: false
|
|
161
|
+
schema:
|
|
162
|
+
type: string
|
|
163
|
+
enum:
|
|
164
|
+
- POST
|
|
165
|
+
- name: Access-Control-Request-Headers
|
|
166
|
+
in: header
|
|
167
|
+
required: false
|
|
168
|
+
schema:
|
|
169
|
+
type: string
|
|
170
|
+
enum:
|
|
171
|
+
- content-type
|
|
172
|
+
- authorization,content-type,traceparent,tracestate
|
|
173
|
+
responses:
|
|
174
|
+
'204':
|
|
175
|
+
description: Preflight answered. The `access-control-allow-*` headers are present only when
|
|
176
|
+
the origin, the requested method and every requested header are allowed.
|
|
177
|
+
headers:
|
|
178
|
+
access-control-allow-origin:
|
|
179
|
+
description: The request's `Origin` (`*` when any origin is allowed)
|
|
180
|
+
schema:
|
|
181
|
+
type: string
|
|
182
|
+
access-control-allow-methods:
|
|
183
|
+
description: The requested method
|
|
184
|
+
schema:
|
|
185
|
+
type: string
|
|
186
|
+
access-control-allow-headers:
|
|
187
|
+
description: The requested headers
|
|
188
|
+
schema:
|
|
189
|
+
type: string
|
|
190
|
+
access-control-allow-credentials:
|
|
191
|
+
schema:
|
|
192
|
+
type: string
|
|
193
|
+
access-control-max-age:
|
|
194
|
+
description: The configured `cors.maxAge`, in seconds
|
|
195
|
+
schema:
|
|
196
|
+
type: string
|
|
197
|
+
vary:
|
|
198
|
+
schema:
|
|
199
|
+
type: string
|
|
200
|
+
'405':
|
|
201
|
+
description: CORS is off (no allowed origin), or the request names no `Access-Control-Request-Method`
|
|
202
|
+
content:
|
|
203
|
+
text/plain:
|
|
204
|
+
schema:
|
|
205
|
+
type: string
|
|
101
206
|
/v1/logs:
|
|
102
207
|
post:
|
|
103
208
|
operationId: ExportLogs
|
|
104
209
|
summary: OTLP/HTTP log export (ExportLogsServiceRequest)
|
|
210
|
+
security:
|
|
211
|
+
- bearerAuth: []
|
|
212
|
+
- basicAuth: []
|
|
213
|
+
- {}
|
|
105
214
|
x-mockingbird:
|
|
106
215
|
supported: true
|
|
107
216
|
parity:
|
|
@@ -121,6 +230,24 @@ paths:
|
|
|
121
230
|
'200':
|
|
122
231
|
description: 'Accepted. JSON requests get `{partialSuccess: {}}`; protobuf requests get an empty
|
|
123
232
|
protobuf response.'
|
|
233
|
+
headers:
|
|
234
|
+
access-control-allow-origin:
|
|
235
|
+
description: With CORS on, the request's `Origin` when it is allowed (`*` when any origin
|
|
236
|
+
is). Sent on every status, errors included.
|
|
237
|
+
schema:
|
|
238
|
+
type: string
|
|
239
|
+
access-control-allow-credentials:
|
|
240
|
+
description: '`true`, beside `access-control-allow-origin`'
|
|
241
|
+
schema:
|
|
242
|
+
type: string
|
|
243
|
+
access-control-expose-headers:
|
|
244
|
+
description: The configured `cors.exposedHeaders`
|
|
245
|
+
schema:
|
|
246
|
+
type: string
|
|
247
|
+
vary:
|
|
248
|
+
description: '`Origin`, whenever CORS is on'
|
|
249
|
+
schema:
|
|
250
|
+
type: string
|
|
124
251
|
content:
|
|
125
252
|
application/json:
|
|
126
253
|
schema:
|
|
@@ -130,17 +257,27 @@ paths:
|
|
|
130
257
|
type: string
|
|
131
258
|
format: binary
|
|
132
259
|
'400':
|
|
133
|
-
description: Undecodable payload
|
|
260
|
+
description: Undecodable payload. Like every receiver error it is a `google.rpc.Status` in
|
|
261
|
+
the request's encoding (binary for protobuf requests, JSON otherwise).
|
|
134
262
|
content:
|
|
135
263
|
application/json:
|
|
136
264
|
schema:
|
|
137
265
|
$ref: '#/components/schemas/RpcStatus'
|
|
266
|
+
application/x-protobuf:
|
|
267
|
+
schema:
|
|
268
|
+
type: string
|
|
269
|
+
format: binary
|
|
138
270
|
'401':
|
|
139
|
-
description:
|
|
271
|
+
description: 'Credentials missing or not accepted for the `ingestAuth` mode: a bearer token
|
|
272
|
+
(`bearer`, the default) or Basic credentials (`basic`). `none` mode refuses nothing.'
|
|
140
273
|
content:
|
|
141
274
|
application/json:
|
|
142
275
|
schema:
|
|
143
276
|
$ref: '#/components/schemas/RpcStatus'
|
|
277
|
+
application/x-protobuf:
|
|
278
|
+
schema:
|
|
279
|
+
type: string
|
|
280
|
+
format: binary
|
|
144
281
|
'415':
|
|
145
282
|
description: Neither application/json nor application/x-protobuf
|
|
146
283
|
content:
|
|
@@ -181,10 +318,82 @@ paths:
|
|
|
181
318
|
application/json:
|
|
182
319
|
schema:
|
|
183
320
|
$ref: '#/components/schemas/RpcStatus'
|
|
321
|
+
options:
|
|
322
|
+
operationId: PreflightLogs
|
|
323
|
+
summary: CORS preflight a browser exporter sends before `POST /v1/logs`
|
|
324
|
+
description: Answered only when `cors.allowedOrigins` is set, and before authentication (a preflight
|
|
325
|
+
carries no credentials). A refused preflight is the same 204 without the `access-control-allow-*`
|
|
326
|
+
headers.
|
|
327
|
+
security: []
|
|
328
|
+
x-mockingbird:
|
|
329
|
+
supported: true
|
|
330
|
+
parity:
|
|
331
|
+
enabled: true
|
|
332
|
+
safe: true
|
|
333
|
+
parameters:
|
|
334
|
+
- name: Origin
|
|
335
|
+
in: header
|
|
336
|
+
required: false
|
|
337
|
+
schema:
|
|
338
|
+
type: string
|
|
339
|
+
enum:
|
|
340
|
+
- https://app.example.test
|
|
341
|
+
- name: Access-Control-Request-Method
|
|
342
|
+
in: header
|
|
343
|
+
required: false
|
|
344
|
+
schema:
|
|
345
|
+
type: string
|
|
346
|
+
enum:
|
|
347
|
+
- POST
|
|
348
|
+
- name: Access-Control-Request-Headers
|
|
349
|
+
in: header
|
|
350
|
+
required: false
|
|
351
|
+
schema:
|
|
352
|
+
type: string
|
|
353
|
+
enum:
|
|
354
|
+
- content-type
|
|
355
|
+
- authorization,content-type,traceparent,tracestate
|
|
356
|
+
responses:
|
|
357
|
+
'204':
|
|
358
|
+
description: Preflight answered. The `access-control-allow-*` headers are present only when
|
|
359
|
+
the origin, the requested method and every requested header are allowed.
|
|
360
|
+
headers:
|
|
361
|
+
access-control-allow-origin:
|
|
362
|
+
description: The request's `Origin` (`*` when any origin is allowed)
|
|
363
|
+
schema:
|
|
364
|
+
type: string
|
|
365
|
+
access-control-allow-methods:
|
|
366
|
+
description: The requested method
|
|
367
|
+
schema:
|
|
368
|
+
type: string
|
|
369
|
+
access-control-allow-headers:
|
|
370
|
+
description: The requested headers
|
|
371
|
+
schema:
|
|
372
|
+
type: string
|
|
373
|
+
access-control-allow-credentials:
|
|
374
|
+
schema:
|
|
375
|
+
type: string
|
|
376
|
+
access-control-max-age:
|
|
377
|
+
description: The configured `cors.maxAge`, in seconds
|
|
378
|
+
schema:
|
|
379
|
+
type: string
|
|
380
|
+
vary:
|
|
381
|
+
schema:
|
|
382
|
+
type: string
|
|
383
|
+
'405':
|
|
384
|
+
description: CORS is off (no allowed origin), or the request names no `Access-Control-Request-Method`
|
|
385
|
+
content:
|
|
386
|
+
text/plain:
|
|
387
|
+
schema:
|
|
388
|
+
type: string
|
|
184
389
|
/v1/metrics:
|
|
185
390
|
post:
|
|
186
391
|
operationId: ExportMetrics
|
|
187
392
|
summary: 'OTLP/HTTP metrics export: accepted and counted, never stored'
|
|
393
|
+
security:
|
|
394
|
+
- bearerAuth: []
|
|
395
|
+
- basicAuth: []
|
|
396
|
+
- {}
|
|
188
397
|
x-mockingbird:
|
|
189
398
|
supported: true
|
|
190
399
|
parity:
|
|
@@ -204,6 +413,24 @@ paths:
|
|
|
204
413
|
'200':
|
|
205
414
|
description: 'Accepted. JSON requests get `{partialSuccess: {}}`; protobuf requests get an empty
|
|
206
415
|
protobuf response.'
|
|
416
|
+
headers:
|
|
417
|
+
access-control-allow-origin:
|
|
418
|
+
description: With CORS on, the request's `Origin` when it is allowed (`*` when any origin
|
|
419
|
+
is). Sent on every status, errors included.
|
|
420
|
+
schema:
|
|
421
|
+
type: string
|
|
422
|
+
access-control-allow-credentials:
|
|
423
|
+
description: '`true`, beside `access-control-allow-origin`'
|
|
424
|
+
schema:
|
|
425
|
+
type: string
|
|
426
|
+
access-control-expose-headers:
|
|
427
|
+
description: The configured `cors.exposedHeaders`
|
|
428
|
+
schema:
|
|
429
|
+
type: string
|
|
430
|
+
vary:
|
|
431
|
+
description: '`Origin`, whenever CORS is on'
|
|
432
|
+
schema:
|
|
433
|
+
type: string
|
|
207
434
|
content:
|
|
208
435
|
application/json:
|
|
209
436
|
schema:
|
|
@@ -213,17 +440,27 @@ paths:
|
|
|
213
440
|
type: string
|
|
214
441
|
format: binary
|
|
215
442
|
'400':
|
|
216
|
-
description: Undecodable payload
|
|
443
|
+
description: Undecodable payload. Like every receiver error it is a `google.rpc.Status` in
|
|
444
|
+
the request's encoding (binary for protobuf requests, JSON otherwise).
|
|
217
445
|
content:
|
|
218
446
|
application/json:
|
|
219
447
|
schema:
|
|
220
448
|
$ref: '#/components/schemas/RpcStatus'
|
|
449
|
+
application/x-protobuf:
|
|
450
|
+
schema:
|
|
451
|
+
type: string
|
|
452
|
+
format: binary
|
|
221
453
|
'401':
|
|
222
|
-
description:
|
|
454
|
+
description: 'Credentials missing or not accepted for the `ingestAuth` mode: a bearer token
|
|
455
|
+
(`bearer`, the default) or Basic credentials (`basic`). `none` mode refuses nothing.'
|
|
223
456
|
content:
|
|
224
457
|
application/json:
|
|
225
458
|
schema:
|
|
226
459
|
$ref: '#/components/schemas/RpcStatus'
|
|
460
|
+
application/x-protobuf:
|
|
461
|
+
schema:
|
|
462
|
+
type: string
|
|
463
|
+
format: binary
|
|
227
464
|
'415':
|
|
228
465
|
description: Neither application/json nor application/x-protobuf
|
|
229
466
|
content:
|
|
@@ -264,6 +501,74 @@ paths:
|
|
|
264
501
|
application/json:
|
|
265
502
|
schema:
|
|
266
503
|
$ref: '#/components/schemas/RpcStatus'
|
|
504
|
+
options:
|
|
505
|
+
operationId: PreflightMetrics
|
|
506
|
+
summary: CORS preflight a browser exporter sends before `POST /v1/metrics`
|
|
507
|
+
description: Answered only when `cors.allowedOrigins` is set, and before authentication (a preflight
|
|
508
|
+
carries no credentials). A refused preflight is the same 204 without the `access-control-allow-*`
|
|
509
|
+
headers.
|
|
510
|
+
security: []
|
|
511
|
+
x-mockingbird:
|
|
512
|
+
supported: true
|
|
513
|
+
parity:
|
|
514
|
+
enabled: true
|
|
515
|
+
safe: true
|
|
516
|
+
parameters:
|
|
517
|
+
- name: Origin
|
|
518
|
+
in: header
|
|
519
|
+
required: false
|
|
520
|
+
schema:
|
|
521
|
+
type: string
|
|
522
|
+
enum:
|
|
523
|
+
- https://app.example.test
|
|
524
|
+
- name: Access-Control-Request-Method
|
|
525
|
+
in: header
|
|
526
|
+
required: false
|
|
527
|
+
schema:
|
|
528
|
+
type: string
|
|
529
|
+
enum:
|
|
530
|
+
- POST
|
|
531
|
+
- name: Access-Control-Request-Headers
|
|
532
|
+
in: header
|
|
533
|
+
required: false
|
|
534
|
+
schema:
|
|
535
|
+
type: string
|
|
536
|
+
enum:
|
|
537
|
+
- content-type
|
|
538
|
+
- authorization,content-type,traceparent,tracestate
|
|
539
|
+
responses:
|
|
540
|
+
'204':
|
|
541
|
+
description: Preflight answered. The `access-control-allow-*` headers are present only when
|
|
542
|
+
the origin, the requested method and every requested header are allowed.
|
|
543
|
+
headers:
|
|
544
|
+
access-control-allow-origin:
|
|
545
|
+
description: The request's `Origin` (`*` when any origin is allowed)
|
|
546
|
+
schema:
|
|
547
|
+
type: string
|
|
548
|
+
access-control-allow-methods:
|
|
549
|
+
description: The requested method
|
|
550
|
+
schema:
|
|
551
|
+
type: string
|
|
552
|
+
access-control-allow-headers:
|
|
553
|
+
description: The requested headers
|
|
554
|
+
schema:
|
|
555
|
+
type: string
|
|
556
|
+
access-control-allow-credentials:
|
|
557
|
+
schema:
|
|
558
|
+
type: string
|
|
559
|
+
access-control-max-age:
|
|
560
|
+
description: The configured `cors.maxAge`, in seconds
|
|
561
|
+
schema:
|
|
562
|
+
type: string
|
|
563
|
+
vary:
|
|
564
|
+
schema:
|
|
565
|
+
type: string
|
|
566
|
+
'405':
|
|
567
|
+
description: CORS is off (no allowed origin), or the request names no `Access-Control-Request-Method`
|
|
568
|
+
content:
|
|
569
|
+
text/plain:
|
|
570
|
+
schema:
|
|
571
|
+
type: string
|
|
267
572
|
/api/organizations:
|
|
268
573
|
get:
|
|
269
574
|
operationId: ListOrganizations
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-service-otel",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Stateful emulator of an OTLP/HTTP collector (JSON and protobuf traces and logs) and the OpenObserve search API over the same store.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|