@downtrace/protocol 0.6.0 → 0.7.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/README.md +18 -2
- package/dist/index.d.ts +867 -14
- package/dist/index.js +570 -17
- package/package.json +1 -1
- package/schema/v0/aggregates.schema.json +233 -6
- package/schema/v0/capture-evidence.schema.json +200 -0
- package/schema/v0/fixtures/evidence/invalid/half-a-coverage.json +8 -0
- package/schema/v0/fixtures/evidence/invalid/no-coverage.json +7 -0
- package/schema/v0/fixtures/evidence/invalid/no-instance.json +7 -0
- package/schema/v0/fixtures/evidence/invalid/operation-with-text.json +17 -0
- package/schema/v0/fixtures/evidence/invalid/operation-without-hash.json +17 -0
- package/schema/v0/fixtures/evidence/invalid/reference-without-selection.json +49 -0
- package/schema/v0/fixtures/evidence/invalid/unknown-protocol.json +8 -0
- package/schema/v0/fixtures/evidence/valid/complete.json +28 -0
- package/schema/v0/fixtures/evidence/valid/no-requests.json +8 -0
- package/schema/v0/fixtures/evidence/valid/partial.json +27 -0
- package/schema/v0/fixtures/evidence/valid/with-reference.json +75 -0
- package/schema/v0/fixtures/invalid/capture-without-a-start.json +50 -0
- package/schema/v0/fixtures/invalid/exception-that-did-not-happen.json +52 -0
- package/schema/v0/fixtures/invalid/operation-with-class-and-text.json +87 -0
- package/schema/v0/fixtures/invalid/runtime-with-nothing-in-it.json +51 -0
- package/schema/v0/fixtures/invalid/withholding-with-nothing-in-it.json +46 -0
- package/schema/v0/fixtures/response/invalid/capture-without-deadline.json +5 -0
- package/schema/v0/fixtures/response/invalid/capture-without-id.json +5 -0
- package/schema/v0/fixtures/response/invalid/missing-accepted.json +1 -0
- package/schema/v0/fixtures/response/invalid/unknown-field.json +1 -0
- package/schema/v0/fixtures/response/invalid/window-of-no-time.json +5 -0
- package/schema/v0/fixtures/response/valid/nothing-pending.json +1 -0
- package/schema/v0/fixtures/response/valid/one-capture.json +16 -0
- package/schema/v0/fixtures/response/valid/re-sent-batch.json +1 -0
- package/schema/v0/fixtures/valid/capture-started.json +51 -0
- package/schema/v0/fixtures/valid/operation-omitted-with-class.json +86 -0
- package/schema/v0/fixtures/valid/process-exceptions.json +58 -0
- package/schema/v0/fixtures/valid/profile-without-intervals.json +60 -0
- package/schema/v0/fixtures/{invalid/runtime-missing-rss.json → valid/runtime-without-an-event-loop.json} +2 -7
- package/schema/v0/fixtures/valid/withholding.json +49 -0
- package/schema/v0/ingest-response.schema.json +71 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
//#region src/generated/paths.d.ts
|
|
2
2
|
/** Path, relative to the ingest URL, that receives AggregatesBatch payloads. */
|
|
3
3
|
declare const AGGREGATES_PATH = "/v0/aggregates";
|
|
4
|
+
/** Path template that receives a capture's evidence. `{id}` is the capture's identifier. */
|
|
5
|
+
declare const CAPTURE_EVIDENCE_PATH = "/v0/captures/{id}/evidence";
|
|
6
|
+
/** The evidence path for one capture. Here rather than in every caller: one place builds it (gh-322). */
|
|
7
|
+
declare function captureEvidencePath(id: string): string;
|
|
4
8
|
//#endregion
|
|
5
9
|
//#region src/generated/aggregates.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* Whether an observer is attached (`on`), was not asked for (`off`), or was asked for and could not attach (`unavailable`) — a driver that is not resolvable from the application's root, for instance. The third one is the point: without it, a service that is not being watched looks exactly like a service that has nothing to watch (COB-01, invariant 14).
|
|
12
|
+
*/
|
|
13
|
+
type ObserverState = "on" | "off" | "unavailable";
|
|
6
14
|
/**
|
|
7
15
|
* A batch of per-interval, per-route aggregates sent by an agent to the cloud (POST /v0/aggregates).
|
|
8
16
|
*/
|
|
@@ -10,22 +18,108 @@ interface AggregatesBatch {
|
|
|
10
18
|
/**
|
|
11
19
|
* Protocol version this batch conforms to. Every published minor of v0 stays acceptable.
|
|
12
20
|
*/
|
|
13
|
-
protocol: "0.1.0" | "0.2.0" | "0.3.0" | "0.4.0" | "0.5.0" | "0.6.0";
|
|
21
|
+
protocol: "0.1.0" | "0.2.0" | "0.3.0" | "0.4.0" | "0.5.0" | "0.6.0" | "0.7.0";
|
|
14
22
|
agent: AgentInfo;
|
|
15
23
|
instance: InstanceInfo;
|
|
16
24
|
deploy: DeployInfo;
|
|
17
25
|
/**
|
|
18
|
-
*
|
|
26
|
+
* The intervals this batch carries. May be empty when the batch carries a profile: the profile has a cadence of its own and hangs off the batch, not off an interval (ADR 0017), so tying its delivery to one meant it was lost whenever a window closed with no traffic — at shutdown, always (gh-375). A batch with neither is refused by the cloud with a reason, which the schema cannot say without making the generated types unusable.
|
|
27
|
+
*
|
|
28
|
+
* @minItems 0
|
|
19
29
|
* @maxItems 6
|
|
20
30
|
*/
|
|
21
|
-
intervals: [Interval] | [Interval, Interval] | [Interval, Interval, Interval] | [Interval, Interval, Interval, Interval] | [Interval, Interval, Interval, Interval, Interval] | [Interval, Interval, Interval, Interval, Interval, Interval];
|
|
31
|
+
intervals: [] | [Interval] | [Interval, Interval] | [Interval, Interval, Interval] | [Interval, Interval, Interval, Interval] | [Interval, Interval, Interval, Interval, Interval] | [Interval, Interval, Interval, Interval, Interval, Interval];
|
|
22
32
|
profile?: Profile;
|
|
33
|
+
/**
|
|
34
|
+
* Progress on the captures this sender was asked for. Absent from every sender that predates it, and from every batch with nothing to report. Bounded like the answer that carries the orders.
|
|
35
|
+
*
|
|
36
|
+
* @maxItems 16
|
|
37
|
+
*/
|
|
38
|
+
captures?: [] | [CaptureProgress] | [CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress] | [CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress, CaptureProgress];
|
|
39
|
+
/**
|
|
40
|
+
* Distinct exception signatures this process saw outside any request. Absent from every sender that predates it and from every batch with none. Bounded: a process crashing in a loop must not become an unbounded batch.
|
|
41
|
+
*
|
|
42
|
+
* @maxItems 32
|
|
43
|
+
*/
|
|
44
|
+
exceptions?: ProcessException[];
|
|
45
|
+
/**
|
|
46
|
+
* Local signals that ask for a capture. `product.md:124` gives the instrumentation «disparar por señales locales»: it sees a process in trouble before any aggregate crosses the cloud, and asking in the batch costs no channel of its own — the answer already carries the orders (ADR 0071). Absent from every sender that predates it and from every batch with nothing to ask. The cloud decides: the same budget, cooldown and concurrency as any other capture (`product.md:122`), and a refusal is silence, because there is nothing the instrumentation would do differently.
|
|
47
|
+
*
|
|
48
|
+
* @maxItems 4
|
|
49
|
+
*/
|
|
50
|
+
triggers?: [] | [LocalTrigger] | [LocalTrigger, LocalTrigger] | [LocalTrigger, LocalTrigger, LocalTrigger] | [LocalTrigger, LocalTrigger, LocalTrigger, LocalTrigger];
|
|
23
51
|
}
|
|
24
52
|
interface AgentInfo {
|
|
25
53
|
name: string;
|
|
26
54
|
version: string;
|
|
27
55
|
runtime: "node" | "go";
|
|
28
56
|
runtimeVersion: string;
|
|
57
|
+
observers?: Observers;
|
|
58
|
+
withholding?: Withholding;
|
|
59
|
+
resources?: AgentResources;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Absent from an instrumentation older than protocol 0.7.0. Absent is not 'nothing is observed': it is 'this one did not say', and the two must not be shown alike.
|
|
63
|
+
*/
|
|
64
|
+
interface Observers {
|
|
65
|
+
pg?: ObserverState;
|
|
66
|
+
http?: ObserverState;
|
|
67
|
+
redis?: ObserverState;
|
|
68
|
+
runtime?: ObserverState;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Absent means **this sender did not say**, not that it withholds nothing — the same reading as `observers`, and for the same reason.
|
|
72
|
+
*/
|
|
73
|
+
interface Withholding {
|
|
74
|
+
/**
|
|
75
|
+
* True when the sender is in minimal mode: no query text, no route templates, no dependency hosts, no error messages. Only ever true — a sender that is not in minimal mode leaves it out.
|
|
76
|
+
*/
|
|
77
|
+
freeText?: true;
|
|
78
|
+
/**
|
|
79
|
+
* How many endpoints are excluded. Absent means none are.
|
|
80
|
+
*/
|
|
81
|
+
endpoints?: number;
|
|
82
|
+
/**
|
|
83
|
+
* How many dependencies are excluded. Absent means none are.
|
|
84
|
+
*/
|
|
85
|
+
dependencies?: number;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* What the instrumentation costs and what it has lost, measured by itself. Absent means **this sender did not say**, the same reading as `observers` and `withholding`. `product.md:239` asks for it by name: «recursos internos medidos».
|
|
89
|
+
*/
|
|
90
|
+
interface AgentResources {
|
|
91
|
+
/**
|
|
92
|
+
* Batches the instrumentation threw away because its queue was full, since the previous batch. This is telemetry that existed and is gone: the number that separates «nothing happened» from «nothing arrived».
|
|
93
|
+
*/
|
|
94
|
+
droppedBatches?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Batches the cloud refused as invalid, since the previous batch. Nothing broke: something was sent wrong.
|
|
97
|
+
*/
|
|
98
|
+
rejectedBatches?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Batches that could not be sent —network, timeout, a cloud that was not there— since the previous batch. Not the same as dropped: these are retried, and only become loss if the queue fills.
|
|
101
|
+
*/
|
|
102
|
+
failedBatches?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Errors inside the instrumentation itself, since the previous batch. It disables itself after enough of them, and a sender that has gone quiet with these climbing is not a quiet service.
|
|
105
|
+
*/
|
|
106
|
+
internalErrors?: number;
|
|
107
|
+
/**
|
|
108
|
+
* What the black box's registers have allocated, right now. An instant, and arithmetic rather than a measurement: the rings are preallocated.
|
|
109
|
+
*/
|
|
110
|
+
bufferBytes?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Estimated milliseconds of the instrumentation's own hooks per request. **An estimate**, sampled, and named as one: it is what invariant 3 budgets, and reporting it as an exact measurement would claim a precision the sampling does not have.
|
|
113
|
+
*/
|
|
114
|
+
hookMsPerRequest?: number;
|
|
115
|
+
/**
|
|
116
|
+
* What the instrumentation has given up because it was costing too much, cheapest loss first. `product.md:241` asks for both halves —«se autolimita» and «lo registra como pérdida de cobertura»— and this is the second. An enum and not free text: it is ours, and it has to be comparable between senders.
|
|
117
|
+
*/
|
|
118
|
+
shed?: "nothing" | "fine" | "profile";
|
|
119
|
+
/**
|
|
120
|
+
* Why it gave ground. Absent when nothing was given up.
|
|
121
|
+
*/
|
|
122
|
+
shedReason?: "latency" | "memory";
|
|
29
123
|
}
|
|
30
124
|
interface InstanceInfo {
|
|
31
125
|
/**
|
|
@@ -168,13 +262,13 @@ interface Dependency {
|
|
|
168
262
|
waitMs?: number;
|
|
169
263
|
}
|
|
170
264
|
/**
|
|
171
|
-
*
|
|
265
|
+
* What the runtime itself was doing. Every field is optional and at least one has to be there: `product.md:251` says the protocol is independent of the language, and a Go runtime has garbage collection, a heap and a resident set but no event loop. Requiring the six of them meant it could either invent an event loop or send none of the three it does have. An empty object is not a reading, hence the minimum of one (gh-285).
|
|
172
266
|
*/
|
|
173
267
|
interface RuntimeHealth {
|
|
174
268
|
/**
|
|
175
269
|
* How long the event loop was late, in ms. The signal that says the process itself is the bottleneck.
|
|
176
270
|
*/
|
|
177
|
-
eventLoopDelayMs
|
|
271
|
+
eventLoopDelayMs?: {
|
|
178
272
|
/**
|
|
179
273
|
* Median delay.
|
|
180
274
|
*/
|
|
@@ -191,23 +285,23 @@ interface RuntimeHealth {
|
|
|
191
285
|
/**
|
|
192
286
|
* Total time spent in garbage collection during the interval.
|
|
193
287
|
*/
|
|
194
|
-
gcPauseMs
|
|
288
|
+
gcPauseMs?: number;
|
|
195
289
|
/**
|
|
196
290
|
* Garbage collections during the interval.
|
|
197
291
|
*/
|
|
198
|
-
gcCount
|
|
292
|
+
gcCount?: number;
|
|
199
293
|
/**
|
|
200
294
|
* Heap in use at the end of the interval.
|
|
201
295
|
*/
|
|
202
|
-
heapUsedMb
|
|
296
|
+
heapUsedMb?: number;
|
|
203
297
|
/**
|
|
204
298
|
* Resident set size at the end of the interval.
|
|
205
299
|
*/
|
|
206
|
-
rssMb
|
|
300
|
+
rssMb?: number;
|
|
207
301
|
/**
|
|
208
302
|
* Peak concurrent in-flight requests during the interval.
|
|
209
303
|
*/
|
|
210
|
-
inFlightMax
|
|
304
|
+
inFlightMax?: number;
|
|
211
305
|
}
|
|
212
306
|
/**
|
|
213
307
|
* What each route normally does, sent once a minute rather than with every interval: a profile changes when the code changes, and at the aggregates' cadence it would not fit in the project's row budget (ADR 0017).
|
|
@@ -266,6 +360,69 @@ interface Operation {
|
|
|
266
360
|
* Only on the `(other)` bucket: how many distinct operations it merges, so a cap does not become a lie by omission.
|
|
267
361
|
*/
|
|
268
362
|
distinct?: number;
|
|
363
|
+
/**
|
|
364
|
+
* What kind of statement this is, when the sender could not normalise it safely. Its presence is the reason the text is absent: `product.md:104` says a query the normaliser does not understand travels «solo como hash y clase», and this is the class. Never sent together with `text` — they are two answers to the same question. Our word and not the service's: it is decided from the first keyword, which is all that can be told without understanding the rest (gh-344).
|
|
365
|
+
*/
|
|
366
|
+
class?: "select" | "insert" | "update" | "delete" | "other";
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* What the instrumentation has to say about a capture the cloud asked it for. The order travels in the ingest response (ADR 0071) and the answer travels here, on the same cadence and at the same cost: a path of its own would be one more call per capture, and one more thing to authenticate, for a fact that fits in the batch that is already going (gh-378).
|
|
370
|
+
*/
|
|
371
|
+
interface CaptureProgress {
|
|
372
|
+
/**
|
|
373
|
+
* The capture's id, as the ingest response gave it. Carries nothing the service wrote.
|
|
374
|
+
*/
|
|
375
|
+
id: string;
|
|
376
|
+
/**
|
|
377
|
+
* Unix milliseconds when observation **really** started, which CAP-01 keeps apart from when the capture was accepted.
|
|
378
|
+
*/
|
|
379
|
+
startedAt: number;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Something thrown outside any instrumented operation: an exception nobody caught, or a promise rejected with no `catch`. `product.md:77` asks for «errores **y excepciones**», and these are the two the word «excepciones» names. They live on the batch and not in the profile because they have **no route** — they happen outside a request's life, or after it ended — and filing them under a route that is not theirs would be worse than not having them (gh-341, ADR 0102).
|
|
383
|
+
*/
|
|
384
|
+
interface ProcessException {
|
|
385
|
+
/**
|
|
386
|
+
* Which of the two. Two different failures with two different fixes: counting them together hides which one is happening.
|
|
387
|
+
*/
|
|
388
|
+
kind: "uncaught" | "unhandled-rejection";
|
|
389
|
+
/**
|
|
390
|
+
* Stable identity of the signature, the same shape a query's or an operation error's has (ADR 0017).
|
|
391
|
+
*/
|
|
392
|
+
hash: string;
|
|
393
|
+
/**
|
|
394
|
+
* Type, sanitised message and stack signature. Optional and for the same reason as everywhere else: when nothing recognisable survives the sanitising, only the type and the signature travel (ADR 0084). Its absence is not the absence of an exception.
|
|
395
|
+
*/
|
|
396
|
+
text?: string;
|
|
397
|
+
/**
|
|
398
|
+
* How many times this signature happened. An instant per occurrence would be a row per crash of a process that crashes in a loop; what a reader asks is how many.
|
|
399
|
+
*/
|
|
400
|
+
count: number;
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* One local signal, sustained past its threshold. It asks for detail; it does not claim a cause (invariant 7).
|
|
404
|
+
*/
|
|
405
|
+
interface LocalTrigger {
|
|
406
|
+
/**
|
|
407
|
+
* Which signal fired. An enum and not free text: the cloud files findings by footprint, and a trigger type nobody can compare is a footprint that never matches. `product.md:114` names the absolute-threshold signals; this is the first of them.
|
|
408
|
+
*/
|
|
409
|
+
signal: "event-loop-delay";
|
|
410
|
+
/**
|
|
411
|
+
* Unix milliseconds when the signal was last seen over its threshold. Milliseconds and not a date string because that is how this contract writes an instant —an interval's `start`, a capture's `startedAt`— and the evidence, which writes dates, is a different payload with different readers.
|
|
412
|
+
*/
|
|
413
|
+
observedAt: number;
|
|
414
|
+
/**
|
|
415
|
+
* What was measured: the p99 of the event loop delay over the interval that fired.
|
|
416
|
+
*/
|
|
417
|
+
valueMs?: number;
|
|
418
|
+
/**
|
|
419
|
+
* The threshold it passed, sent with the value because a number without its threshold cannot be read by anyone who does not have this version of the instrumentation in front of them.
|
|
420
|
+
*/
|
|
421
|
+
thresholdMs?: number;
|
|
422
|
+
/**
|
|
423
|
+
* How many consecutive intervals it stayed over. More than one is what makes it sustained rather than a spike (`product.md:114`).
|
|
424
|
+
*/
|
|
425
|
+
intervals?: number;
|
|
269
426
|
}
|
|
270
427
|
//#endregion
|
|
271
428
|
//#region src/generated/boundaries.d.ts
|
|
@@ -278,11 +435,190 @@ declare const CALLS_PER_REQUEST_BOUNDARIES_V0: readonly number[];
|
|
|
278
435
|
/** Number of calls-per-request buckets: boundaries + 1 open-ended bucket. */
|
|
279
436
|
declare const CALLS_PER_REQUEST_BUCKETS_V0 = 8;
|
|
280
437
|
//#endregion
|
|
438
|
+
//#region src/generated/capture-evidence.d.ts
|
|
439
|
+
/**
|
|
440
|
+
* What an instrumentation sends back for a capture the cloud asked for (POST /v0/captures/{id}/evidence). It is the contents of the black box's fine register, frozen: requests with their operations, in order, with starts and ends. Hashes only — the text of a query never travels here (invariant 5). Its own path and not the aggregates batch, because a batch is what goes out every ten seconds and this is a rare event several orders of magnitude larger.
|
|
441
|
+
*/
|
|
442
|
+
interface CaptureEvidence {
|
|
443
|
+
/**
|
|
444
|
+
* Protocol version this payload conforms to. Same enum as a batch: every published minor of v0 stays acceptable.
|
|
445
|
+
*/
|
|
446
|
+
protocol: "0.1.0" | "0.2.0" | "0.3.0" | "0.4.0" | "0.5.0" | "0.6.0" | "0.7.0";
|
|
447
|
+
/**
|
|
448
|
+
* Which process observed this. Several instances of one deployment get the same order on purpose (ADR 0071), so the cloud has to be able to tell two answers apart.
|
|
449
|
+
*/
|
|
450
|
+
instance: {
|
|
451
|
+
id: string;
|
|
452
|
+
hostname?: string;
|
|
453
|
+
pid?: number;
|
|
454
|
+
};
|
|
455
|
+
/**
|
|
456
|
+
* The **effective start of observation**, which is the instant CAP-01 insists on keeping apart from the acceptance. It travels with the evidence rather than in a call of its own: a capture that started and never finished should not cost two requests.
|
|
457
|
+
*/
|
|
458
|
+
startedAt: string;
|
|
459
|
+
/**
|
|
460
|
+
* When the instrumentation stopped watching.
|
|
461
|
+
*/
|
|
462
|
+
endedAt: string;
|
|
463
|
+
coverage: CaptureCoverage;
|
|
464
|
+
/**
|
|
465
|
+
* The requests observed, oldest first. An empty array is a real answer and the commonest one: a route nobody called during the window. It means the capture is `empty`, and `product.md:192` is explicit that this must never read as an invitation to ask again unchanged.
|
|
466
|
+
*
|
|
467
|
+
* @maxItems 4096
|
|
468
|
+
*/
|
|
469
|
+
requests: CapturedRequest[];
|
|
470
|
+
reference?: ReferenceSamples;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* `product.md:192` asks a capture to declare **both** coverages: what it attached from detail still retained, and what it observed from its effective start. Two numbers, never one — a total would hide that half of it is older than the capture.
|
|
474
|
+
*/
|
|
475
|
+
interface CaptureCoverage {
|
|
476
|
+
/**
|
|
477
|
+
* Requests seen from the effective start onwards.
|
|
478
|
+
*/
|
|
479
|
+
observedRequests: number;
|
|
480
|
+
/**
|
|
481
|
+
* Requests that were already in the register when the capture started, and are attached. Zero is normal: the register may have wrapped, and nothing brings back what was not kept.
|
|
482
|
+
*/
|
|
483
|
+
attachedRequests: number;
|
|
484
|
+
/**
|
|
485
|
+
* Requests whose operations were overwritten before they could be read. Their timing is still true; what is gone is the detail. Reported rather than dropped, because a request with no operations reads as one that ran nothing (invariant 14).
|
|
486
|
+
*/
|
|
487
|
+
detailLost: number;
|
|
488
|
+
/**
|
|
489
|
+
* Requests that ran more operations than the register keeps per request. Their count is real and their list is not complete.
|
|
490
|
+
*/
|
|
491
|
+
truncated: number;
|
|
492
|
+
}
|
|
493
|
+
interface CapturedRequest {
|
|
494
|
+
method: string;
|
|
495
|
+
/**
|
|
496
|
+
* The route template, never the path with its values in it (invariant 5).
|
|
497
|
+
*/
|
|
498
|
+
route: string;
|
|
499
|
+
status: number;
|
|
500
|
+
/**
|
|
501
|
+
* When this request started. Absolute, so requests from two instances can be read side by side.
|
|
502
|
+
*/
|
|
503
|
+
startedAt: string;
|
|
504
|
+
durationMs: number;
|
|
505
|
+
/**
|
|
506
|
+
* What it ran, in the order it started them. Empty means it ran nothing — unless `detailLost` says the list was overwritten, which is why that flag is on the request and not only in the totals.
|
|
507
|
+
*
|
|
508
|
+
* @maxItems 256
|
|
509
|
+
*/
|
|
510
|
+
operations: CapturedOperation[];
|
|
511
|
+
/**
|
|
512
|
+
* This request ran more operations than the register keeps per request. Absent means false.
|
|
513
|
+
*/
|
|
514
|
+
truncated?: boolean;
|
|
515
|
+
/**
|
|
516
|
+
* This request's operations were overwritten before they were read. Absent means false. Its timing is still true.
|
|
517
|
+
*/
|
|
518
|
+
detailLost?: boolean;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* One operation inside a request. Starts and ends and not durations, because the whole reason for capturing detail is order and overlap, which a duration cannot express (ADR 0068).
|
|
522
|
+
*/
|
|
523
|
+
interface CapturedOperation {
|
|
524
|
+
/**
|
|
525
|
+
* The fingerprint's hash. Never the text: the profile is where a sender chooses whether to ship the text of its queries, and this path never carries it (invariant 5, ADR 0017).
|
|
526
|
+
*/
|
|
527
|
+
hash: string;
|
|
528
|
+
/**
|
|
529
|
+
* Milliseconds from the start of its own request.
|
|
530
|
+
*/
|
|
531
|
+
startMs: number;
|
|
532
|
+
endMs: number;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* A few requests of each endpoint kept as something to compare the captured ones against. `product.md:100`: «Comparar requests degradadas con requests de referencia exige conservar ambas; el detalle fino de hace una hora ya no existe». Being earlier does not certify health, which is why every field here is about how they were chosen and none of them says «healthy».
|
|
536
|
+
*/
|
|
537
|
+
interface ReferenceSamples {
|
|
538
|
+
/**
|
|
539
|
+
* How they were chosen. Travels with them because a sample whose selection is unknown cannot support an attribution (ATR-01). `uniform-reservoir`: every request observed of that endpoint had the same chance of being kept, whatever it did — which is what «the fastest N» would not be.
|
|
540
|
+
*/
|
|
541
|
+
selection: "uniform-reservoir";
|
|
542
|
+
/**
|
|
543
|
+
* How many requests they were drawn from, over the life of the sending process.
|
|
544
|
+
*/
|
|
545
|
+
population: number;
|
|
546
|
+
/**
|
|
547
|
+
* Endpoints seen that the register had no room for. Counted rather than silently absent: an endpoint with no samples is not an endpoint with no traffic (invariant 14).
|
|
548
|
+
*/
|
|
549
|
+
routesDropped?: number;
|
|
550
|
+
/**
|
|
551
|
+
* True when requests were observed that the register deliberately did not consider. The instrumentation pauses renewal while it is watching a capture, which is the closest it can get to REF-01 from inside the process: it cannot know whether an incident is open, but it knows detail has been asked of it. Absent means false.
|
|
552
|
+
*/
|
|
553
|
+
renewalPaused?: boolean;
|
|
554
|
+
/**
|
|
555
|
+
* The kept requests, in the same shape as the captured ones. An empty array is a real answer: a process that has just started has nothing to compare with yet.
|
|
556
|
+
*
|
|
557
|
+
* @maxItems 64
|
|
558
|
+
*/
|
|
559
|
+
samples: CapturedRequest[];
|
|
560
|
+
}
|
|
561
|
+
//#endregion
|
|
562
|
+
//#region src/generated/ingest-response.d.ts
|
|
563
|
+
/**
|
|
564
|
+
* What the cloud answers to POST /v0/aggregates. Described here, and not left as an implementation detail, because since protocol 0.7.0 it carries instructions: the captures the cloud is waiting for. It follows the same rules as the batch — fields are only ever added, each addition bumps the minor, and a published minor is accepted for ever — with one difference in who owes what. An agent that does not read this body must behave exactly as it did before (ADR 0008), so every field here is something an agent may ignore.
|
|
565
|
+
*/
|
|
566
|
+
interface IngestResponse {
|
|
567
|
+
/**
|
|
568
|
+
* How many intervals of the batch the cloud took.
|
|
569
|
+
*/
|
|
570
|
+
accepted: number;
|
|
571
|
+
/**
|
|
572
|
+
* How many rows were new. Lower than `accepted` when a batch is re-sent: ingest is idempotent.
|
|
573
|
+
*/
|
|
574
|
+
inserted: number;
|
|
575
|
+
/**
|
|
576
|
+
* Captures the cloud is waiting for, in the environment this batch came from. Absent or empty means none. Bounded because this rides on every batch: the cloud never asks for more at once than an instrumentation could reasonably freeze, and the concurrency budget is far below this anyway. Several instances of one deployment receive the same list on purpose — the cloud knows which instance sent recently, not which is alive, so dealing one capture to one instance would lose it silently when that process is gone (invariant 14).
|
|
577
|
+
*
|
|
578
|
+
* @maxItems 16
|
|
579
|
+
*/
|
|
580
|
+
captures?: PendingCapture[];
|
|
581
|
+
}
|
|
582
|
+
interface PendingCapture {
|
|
583
|
+
/**
|
|
584
|
+
* What the evidence will be sent back under. Carries nothing the service wrote.
|
|
585
|
+
*/
|
|
586
|
+
id: string;
|
|
587
|
+
/**
|
|
588
|
+
* The environment this capture is about, which is always the one the batch came from. Sent anyway so the payload is readable on its own.
|
|
589
|
+
*/
|
|
590
|
+
environment?: string;
|
|
591
|
+
/**
|
|
592
|
+
* HTTP method of the route to watch.
|
|
593
|
+
*/
|
|
594
|
+
method?: string;
|
|
595
|
+
/**
|
|
596
|
+
* Route template to watch. Empty when the capture is about a dependency rather than a route.
|
|
597
|
+
*/
|
|
598
|
+
route?: string;
|
|
599
|
+
/**
|
|
600
|
+
* Dependency kind to watch. Empty when the capture is about a route.
|
|
601
|
+
*/
|
|
602
|
+
kind?: string;
|
|
603
|
+
/**
|
|
604
|
+
* Dependency target to watch.
|
|
605
|
+
*/
|
|
606
|
+
target?: string;
|
|
607
|
+
/**
|
|
608
|
+
* How long to watch for, from the effective start of observation.
|
|
609
|
+
*/
|
|
610
|
+
windowSeconds: number;
|
|
611
|
+
/**
|
|
612
|
+
* After this instant the cloud stops waiting. An instrumentation that reads a stale response must not start a capture past it: the cloud will refuse the evidence, and a capture nobody is waiting for spends the fine register for nothing.
|
|
613
|
+
*/
|
|
614
|
+
expiresAt: string;
|
|
615
|
+
}
|
|
616
|
+
//#endregion
|
|
281
617
|
//#region src/generated/versions.d.ts
|
|
282
618
|
/** Every published minor of v0, oldest first. The cloud never stops accepting one it published (ADR 0008). */
|
|
283
|
-
declare const ACCEPTED_PROTOCOL_VERSIONS_V0: readonly ["0.1.0", "0.2.0", "0.3.0", "0.4.0", "0.5.0", "0.6.0"];
|
|
619
|
+
declare const ACCEPTED_PROTOCOL_VERSIONS_V0: readonly ["0.1.0", "0.2.0", "0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.7.0"];
|
|
284
620
|
/** The newest published minor: what an up-to-date agent stamps on every batch. */
|
|
285
|
-
declare const PROTOCOL_VERSION = "0.
|
|
621
|
+
declare const PROTOCOL_VERSION = "0.7.0";
|
|
286
622
|
//#endregion
|
|
287
623
|
//#region src/index.d.ts
|
|
288
624
|
/** The JSON Schema (draft 2020-12) for AggregatesBatch, for validators on either side. */
|
|
@@ -317,10 +653,35 @@ declare const AGGREGATES_SCHEMA_V0: {
|
|
|
317
653
|
items: {
|
|
318
654
|
$ref: string;
|
|
319
655
|
};
|
|
656
|
+
description: string;
|
|
320
657
|
};
|
|
321
658
|
profile: {
|
|
322
659
|
$ref: string;
|
|
323
660
|
};
|
|
661
|
+
captures: {
|
|
662
|
+
type: string;
|
|
663
|
+
maxItems: number;
|
|
664
|
+
items: {
|
|
665
|
+
$ref: string;
|
|
666
|
+
};
|
|
667
|
+
description: string;
|
|
668
|
+
};
|
|
669
|
+
exceptions: {
|
|
670
|
+
type: string;
|
|
671
|
+
maxItems: number;
|
|
672
|
+
items: {
|
|
673
|
+
$ref: string;
|
|
674
|
+
};
|
|
675
|
+
description: string;
|
|
676
|
+
};
|
|
677
|
+
triggers: {
|
|
678
|
+
type: string;
|
|
679
|
+
maxItems: number;
|
|
680
|
+
items: {
|
|
681
|
+
$ref: string;
|
|
682
|
+
};
|
|
683
|
+
description: string;
|
|
684
|
+
};
|
|
324
685
|
};
|
|
325
686
|
$defs: {
|
|
326
687
|
AgentInfo: {
|
|
@@ -347,6 +708,18 @@ declare const AGGREGATES_SCHEMA_V0: {
|
|
|
347
708
|
minLength: number;
|
|
348
709
|
maxLength: number;
|
|
349
710
|
};
|
|
711
|
+
observers: {
|
|
712
|
+
$ref: string;
|
|
713
|
+
description: string;
|
|
714
|
+
};
|
|
715
|
+
withholding: {
|
|
716
|
+
$ref: string;
|
|
717
|
+
description: string;
|
|
718
|
+
};
|
|
719
|
+
resources: {
|
|
720
|
+
$ref: string;
|
|
721
|
+
description: string;
|
|
722
|
+
};
|
|
350
723
|
};
|
|
351
724
|
};
|
|
352
725
|
InstanceInfo: {
|
|
@@ -553,7 +926,6 @@ declare const AGGREGATES_SCHEMA_V0: {
|
|
|
553
926
|
description: string;
|
|
554
927
|
type: string;
|
|
555
928
|
additionalProperties: boolean;
|
|
556
|
-
required: string[];
|
|
557
929
|
properties: {
|
|
558
930
|
eventLoopDelayMs: {
|
|
559
931
|
type: string;
|
|
@@ -604,6 +976,7 @@ declare const AGGREGATES_SCHEMA_V0: {
|
|
|
604
976
|
description: string;
|
|
605
977
|
};
|
|
606
978
|
};
|
|
979
|
+
minProperties: number;
|
|
607
980
|
};
|
|
608
981
|
Dependency: {
|
|
609
982
|
title: string;
|
|
@@ -742,6 +1115,486 @@ declare const AGGREGATES_SCHEMA_V0: {
|
|
|
742
1115
|
minimum: number;
|
|
743
1116
|
description: string;
|
|
744
1117
|
};
|
|
1118
|
+
class: {
|
|
1119
|
+
enum: string[];
|
|
1120
|
+
description: string;
|
|
1121
|
+
};
|
|
1122
|
+
};
|
|
1123
|
+
not: {
|
|
1124
|
+
required: string[];
|
|
1125
|
+
properties: {
|
|
1126
|
+
class: {};
|
|
1127
|
+
text: {};
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
ObserverState: {
|
|
1132
|
+
title: string;
|
|
1133
|
+
enum: string[];
|
|
1134
|
+
description: string;
|
|
1135
|
+
};
|
|
1136
|
+
Observers: {
|
|
1137
|
+
title: string;
|
|
1138
|
+
type: string;
|
|
1139
|
+
additionalProperties: boolean;
|
|
1140
|
+
description: string;
|
|
1141
|
+
properties: {
|
|
1142
|
+
pg: {
|
|
1143
|
+
$ref: string;
|
|
1144
|
+
};
|
|
1145
|
+
http: {
|
|
1146
|
+
$ref: string;
|
|
1147
|
+
};
|
|
1148
|
+
redis: {
|
|
1149
|
+
$ref: string;
|
|
1150
|
+
};
|
|
1151
|
+
runtime: {
|
|
1152
|
+
$ref: string;
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
};
|
|
1156
|
+
Withholding: {
|
|
1157
|
+
title: string;
|
|
1158
|
+
type: string;
|
|
1159
|
+
additionalProperties: boolean;
|
|
1160
|
+
minProperties: number;
|
|
1161
|
+
description: string;
|
|
1162
|
+
properties: {
|
|
1163
|
+
freeText: {
|
|
1164
|
+
type: string;
|
|
1165
|
+
description: string;
|
|
1166
|
+
const: boolean;
|
|
1167
|
+
};
|
|
1168
|
+
endpoints: {
|
|
1169
|
+
type: string;
|
|
1170
|
+
minimum: number;
|
|
1171
|
+
description: string;
|
|
1172
|
+
};
|
|
1173
|
+
dependencies: {
|
|
1174
|
+
type: string;
|
|
1175
|
+
minimum: number;
|
|
1176
|
+
description: string;
|
|
1177
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
};
|
|
1180
|
+
CaptureProgress: {
|
|
1181
|
+
title: string;
|
|
1182
|
+
type: string;
|
|
1183
|
+
additionalProperties: boolean;
|
|
1184
|
+
required: string[];
|
|
1185
|
+
description: string;
|
|
1186
|
+
properties: {
|
|
1187
|
+
id: {
|
|
1188
|
+
type: string;
|
|
1189
|
+
minLength: number;
|
|
1190
|
+
maxLength: number;
|
|
1191
|
+
description: string;
|
|
1192
|
+
};
|
|
1193
|
+
startedAt: {
|
|
1194
|
+
type: string;
|
|
1195
|
+
description: string;
|
|
1196
|
+
};
|
|
1197
|
+
};
|
|
1198
|
+
};
|
|
1199
|
+
ProcessException: {
|
|
1200
|
+
title: string;
|
|
1201
|
+
type: string;
|
|
1202
|
+
additionalProperties: boolean;
|
|
1203
|
+
required: string[];
|
|
1204
|
+
description: string;
|
|
1205
|
+
properties: {
|
|
1206
|
+
kind: {
|
|
1207
|
+
enum: string[];
|
|
1208
|
+
description: string;
|
|
1209
|
+
};
|
|
1210
|
+
hash: {
|
|
1211
|
+
type: string;
|
|
1212
|
+
minLength: number;
|
|
1213
|
+
maxLength: number;
|
|
1214
|
+
description: string;
|
|
1215
|
+
};
|
|
1216
|
+
text: {
|
|
1217
|
+
type: string;
|
|
1218
|
+
maxLength: number;
|
|
1219
|
+
description: string;
|
|
1220
|
+
};
|
|
1221
|
+
count: {
|
|
1222
|
+
type: string;
|
|
1223
|
+
minimum: number;
|
|
1224
|
+
description: string;
|
|
1225
|
+
};
|
|
1226
|
+
};
|
|
1227
|
+
};
|
|
1228
|
+
LocalTrigger: {
|
|
1229
|
+
type: string;
|
|
1230
|
+
title: string;
|
|
1231
|
+
additionalProperties: boolean;
|
|
1232
|
+
required: string[];
|
|
1233
|
+
description: string;
|
|
1234
|
+
properties: {
|
|
1235
|
+
signal: {
|
|
1236
|
+
type: string;
|
|
1237
|
+
enum: string[];
|
|
1238
|
+
description: string;
|
|
1239
|
+
};
|
|
1240
|
+
observedAt: {
|
|
1241
|
+
type: string;
|
|
1242
|
+
minimum: number;
|
|
1243
|
+
description: string;
|
|
1244
|
+
};
|
|
1245
|
+
valueMs: {
|
|
1246
|
+
type: string;
|
|
1247
|
+
minimum: number;
|
|
1248
|
+
description: string;
|
|
1249
|
+
};
|
|
1250
|
+
thresholdMs: {
|
|
1251
|
+
type: string;
|
|
1252
|
+
minimum: number;
|
|
1253
|
+
description: string;
|
|
1254
|
+
};
|
|
1255
|
+
intervals: {
|
|
1256
|
+
type: string;
|
|
1257
|
+
minimum: number;
|
|
1258
|
+
description: string;
|
|
1259
|
+
};
|
|
1260
|
+
};
|
|
1261
|
+
};
|
|
1262
|
+
AgentResources: {
|
|
1263
|
+
title: string;
|
|
1264
|
+
type: string;
|
|
1265
|
+
additionalProperties: boolean;
|
|
1266
|
+
description: string;
|
|
1267
|
+
properties: {
|
|
1268
|
+
droppedBatches: {
|
|
1269
|
+
type: string;
|
|
1270
|
+
minimum: number;
|
|
1271
|
+
description: string;
|
|
1272
|
+
};
|
|
1273
|
+
rejectedBatches: {
|
|
1274
|
+
type: string;
|
|
1275
|
+
minimum: number;
|
|
1276
|
+
description: string;
|
|
1277
|
+
};
|
|
1278
|
+
failedBatches: {
|
|
1279
|
+
type: string;
|
|
1280
|
+
minimum: number;
|
|
1281
|
+
description: string;
|
|
1282
|
+
};
|
|
1283
|
+
internalErrors: {
|
|
1284
|
+
type: string;
|
|
1285
|
+
minimum: number;
|
|
1286
|
+
description: string;
|
|
1287
|
+
};
|
|
1288
|
+
bufferBytes: {
|
|
1289
|
+
type: string;
|
|
1290
|
+
minimum: number;
|
|
1291
|
+
description: string;
|
|
1292
|
+
};
|
|
1293
|
+
hookMsPerRequest: {
|
|
1294
|
+
type: string;
|
|
1295
|
+
minimum: number;
|
|
1296
|
+
description: string;
|
|
1297
|
+
};
|
|
1298
|
+
shed: {
|
|
1299
|
+
type: string;
|
|
1300
|
+
enum: string[];
|
|
1301
|
+
description: string;
|
|
1302
|
+
};
|
|
1303
|
+
shedReason: {
|
|
1304
|
+
type: string;
|
|
1305
|
+
enum: string[];
|
|
1306
|
+
description: string;
|
|
1307
|
+
};
|
|
1308
|
+
};
|
|
1309
|
+
};
|
|
1310
|
+
};
|
|
1311
|
+
};
|
|
1312
|
+
/**
|
|
1313
|
+
* The JSON Schema for what the cloud answers. A contract since 0.8.0, when the answer started carrying the
|
|
1314
|
+
* captures the cloud is waiting for: an agent that ignores this body behaves exactly as it always did.
|
|
1315
|
+
*/
|
|
1316
|
+
declare const INGEST_RESPONSE_SCHEMA_V0: {
|
|
1317
|
+
$schema: string;
|
|
1318
|
+
$id: string;
|
|
1319
|
+
title: string;
|
|
1320
|
+
description: string;
|
|
1321
|
+
type: string;
|
|
1322
|
+
additionalProperties: boolean;
|
|
1323
|
+
required: string[];
|
|
1324
|
+
properties: {
|
|
1325
|
+
accepted: {
|
|
1326
|
+
type: string;
|
|
1327
|
+
minimum: number;
|
|
1328
|
+
description: string;
|
|
1329
|
+
};
|
|
1330
|
+
inserted: {
|
|
1331
|
+
type: string;
|
|
1332
|
+
minimum: number;
|
|
1333
|
+
description: string;
|
|
1334
|
+
};
|
|
1335
|
+
captures: {
|
|
1336
|
+
type: string;
|
|
1337
|
+
maxItems: number;
|
|
1338
|
+
items: {
|
|
1339
|
+
$ref: string;
|
|
1340
|
+
};
|
|
1341
|
+
description: string;
|
|
1342
|
+
};
|
|
1343
|
+
};
|
|
1344
|
+
$defs: {
|
|
1345
|
+
PendingCapture: {
|
|
1346
|
+
type: string;
|
|
1347
|
+
title: string;
|
|
1348
|
+
additionalProperties: boolean;
|
|
1349
|
+
required: string[];
|
|
1350
|
+
properties: {
|
|
1351
|
+
id: {
|
|
1352
|
+
type: string;
|
|
1353
|
+
minLength: number;
|
|
1354
|
+
maxLength: number;
|
|
1355
|
+
description: string;
|
|
1356
|
+
};
|
|
1357
|
+
environment: {
|
|
1358
|
+
type: string;
|
|
1359
|
+
maxLength: number;
|
|
1360
|
+
description: string;
|
|
1361
|
+
};
|
|
1362
|
+
method: {
|
|
1363
|
+
type: string;
|
|
1364
|
+
maxLength: number;
|
|
1365
|
+
description: string;
|
|
1366
|
+
};
|
|
1367
|
+
route: {
|
|
1368
|
+
type: string;
|
|
1369
|
+
maxLength: number;
|
|
1370
|
+
description: string;
|
|
1371
|
+
};
|
|
1372
|
+
kind: {
|
|
1373
|
+
type: string;
|
|
1374
|
+
maxLength: number;
|
|
1375
|
+
description: string;
|
|
1376
|
+
};
|
|
1377
|
+
target: {
|
|
1378
|
+
type: string;
|
|
1379
|
+
maxLength: number;
|
|
1380
|
+
description: string;
|
|
1381
|
+
};
|
|
1382
|
+
windowSeconds: {
|
|
1383
|
+
type: string;
|
|
1384
|
+
minimum: number;
|
|
1385
|
+
maximum: number;
|
|
1386
|
+
description: string;
|
|
1387
|
+
};
|
|
1388
|
+
expiresAt: {
|
|
1389
|
+
type: string;
|
|
1390
|
+
format: string;
|
|
1391
|
+
description: string;
|
|
1392
|
+
};
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
1395
|
+
};
|
|
1396
|
+
};
|
|
1397
|
+
/**
|
|
1398
|
+
* The JSON Schema for a capture's evidence: the black box's fine detail, frozen and sent back. Its own path
|
|
1399
|
+
* and its own contract, because a batch goes out every ten seconds and this is a rare event several orders of
|
|
1400
|
+
* magnitude larger.
|
|
1401
|
+
*/
|
|
1402
|
+
declare const CAPTURE_EVIDENCE_SCHEMA_V0: {
|
|
1403
|
+
$schema: string;
|
|
1404
|
+
$id: string;
|
|
1405
|
+
title: string;
|
|
1406
|
+
description: string;
|
|
1407
|
+
"x-evidence-path": string;
|
|
1408
|
+
type: string;
|
|
1409
|
+
additionalProperties: boolean;
|
|
1410
|
+
required: string[];
|
|
1411
|
+
properties: {
|
|
1412
|
+
protocol: {
|
|
1413
|
+
type: string;
|
|
1414
|
+
description: string;
|
|
1415
|
+
enum: string[];
|
|
1416
|
+
};
|
|
1417
|
+
instance: {
|
|
1418
|
+
type: string;
|
|
1419
|
+
additionalProperties: boolean;
|
|
1420
|
+
required: string[];
|
|
1421
|
+
description: string;
|
|
1422
|
+
properties: {
|
|
1423
|
+
id: {
|
|
1424
|
+
type: string;
|
|
1425
|
+
minLength: number;
|
|
1426
|
+
maxLength: number;
|
|
1427
|
+
};
|
|
1428
|
+
hostname: {
|
|
1429
|
+
type: string;
|
|
1430
|
+
maxLength: number;
|
|
1431
|
+
};
|
|
1432
|
+
pid: {
|
|
1433
|
+
type: string;
|
|
1434
|
+
minimum: number;
|
|
1435
|
+
};
|
|
1436
|
+
};
|
|
1437
|
+
};
|
|
1438
|
+
startedAt: {
|
|
1439
|
+
type: string;
|
|
1440
|
+
format: string;
|
|
1441
|
+
description: string;
|
|
1442
|
+
};
|
|
1443
|
+
endedAt: {
|
|
1444
|
+
type: string;
|
|
1445
|
+
format: string;
|
|
1446
|
+
description: string;
|
|
1447
|
+
};
|
|
1448
|
+
coverage: {
|
|
1449
|
+
$ref: string;
|
|
1450
|
+
};
|
|
1451
|
+
requests: {
|
|
1452
|
+
type: string;
|
|
1453
|
+
maxItems: number;
|
|
1454
|
+
items: {
|
|
1455
|
+
$ref: string;
|
|
1456
|
+
};
|
|
1457
|
+
description: string;
|
|
1458
|
+
};
|
|
1459
|
+
reference: {
|
|
1460
|
+
$ref: string;
|
|
1461
|
+
};
|
|
1462
|
+
};
|
|
1463
|
+
$defs: {
|
|
1464
|
+
Coverage: {
|
|
1465
|
+
type: string;
|
|
1466
|
+
title: string;
|
|
1467
|
+
additionalProperties: boolean;
|
|
1468
|
+
required: string[];
|
|
1469
|
+
description: string;
|
|
1470
|
+
properties: {
|
|
1471
|
+
observedRequests: {
|
|
1472
|
+
type: string;
|
|
1473
|
+
minimum: number;
|
|
1474
|
+
description: string;
|
|
1475
|
+
};
|
|
1476
|
+
attachedRequests: {
|
|
1477
|
+
type: string;
|
|
1478
|
+
minimum: number;
|
|
1479
|
+
description: string;
|
|
1480
|
+
};
|
|
1481
|
+
detailLost: {
|
|
1482
|
+
type: string;
|
|
1483
|
+
minimum: number;
|
|
1484
|
+
description: string;
|
|
1485
|
+
};
|
|
1486
|
+
truncated: {
|
|
1487
|
+
type: string;
|
|
1488
|
+
minimum: number;
|
|
1489
|
+
description: string;
|
|
1490
|
+
};
|
|
1491
|
+
};
|
|
1492
|
+
};
|
|
1493
|
+
CapturedRequest: {
|
|
1494
|
+
type: string;
|
|
1495
|
+
title: string;
|
|
1496
|
+
additionalProperties: boolean;
|
|
1497
|
+
required: string[];
|
|
1498
|
+
properties: {
|
|
1499
|
+
method: {
|
|
1500
|
+
type: string;
|
|
1501
|
+
maxLength: number;
|
|
1502
|
+
};
|
|
1503
|
+
route: {
|
|
1504
|
+
type: string;
|
|
1505
|
+
maxLength: number;
|
|
1506
|
+
description: string;
|
|
1507
|
+
};
|
|
1508
|
+
status: {
|
|
1509
|
+
type: string;
|
|
1510
|
+
minimum: number;
|
|
1511
|
+
maximum: number;
|
|
1512
|
+
};
|
|
1513
|
+
startedAt: {
|
|
1514
|
+
type: string;
|
|
1515
|
+
format: string;
|
|
1516
|
+
description: string;
|
|
1517
|
+
};
|
|
1518
|
+
durationMs: {
|
|
1519
|
+
type: string;
|
|
1520
|
+
minimum: number;
|
|
1521
|
+
};
|
|
1522
|
+
operations: {
|
|
1523
|
+
type: string;
|
|
1524
|
+
maxItems: number;
|
|
1525
|
+
items: {
|
|
1526
|
+
$ref: string;
|
|
1527
|
+
};
|
|
1528
|
+
description: string;
|
|
1529
|
+
};
|
|
1530
|
+
truncated: {
|
|
1531
|
+
type: string;
|
|
1532
|
+
description: string;
|
|
1533
|
+
};
|
|
1534
|
+
detailLost: {
|
|
1535
|
+
type: string;
|
|
1536
|
+
description: string;
|
|
1537
|
+
};
|
|
1538
|
+
};
|
|
1539
|
+
};
|
|
1540
|
+
CapturedOperation: {
|
|
1541
|
+
type: string;
|
|
1542
|
+
title: string;
|
|
1543
|
+
additionalProperties: boolean;
|
|
1544
|
+
required: string[];
|
|
1545
|
+
description: string;
|
|
1546
|
+
properties: {
|
|
1547
|
+
hash: {
|
|
1548
|
+
type: string;
|
|
1549
|
+
minLength: number;
|
|
1550
|
+
maxLength: number;
|
|
1551
|
+
description: string;
|
|
1552
|
+
};
|
|
1553
|
+
startMs: {
|
|
1554
|
+
type: string;
|
|
1555
|
+
minimum: number;
|
|
1556
|
+
description: string;
|
|
1557
|
+
};
|
|
1558
|
+
endMs: {
|
|
1559
|
+
type: string;
|
|
1560
|
+
minimum: number;
|
|
1561
|
+
};
|
|
1562
|
+
};
|
|
1563
|
+
};
|
|
1564
|
+
Reference: {
|
|
1565
|
+
type: string;
|
|
1566
|
+
title: string;
|
|
1567
|
+
additionalProperties: boolean;
|
|
1568
|
+
required: string[];
|
|
1569
|
+
description: string;
|
|
1570
|
+
properties: {
|
|
1571
|
+
selection: {
|
|
1572
|
+
type: string;
|
|
1573
|
+
enum: string[];
|
|
1574
|
+
description: string;
|
|
1575
|
+
};
|
|
1576
|
+
population: {
|
|
1577
|
+
type: string;
|
|
1578
|
+
minimum: number;
|
|
1579
|
+
description: string;
|
|
1580
|
+
};
|
|
1581
|
+
routesDropped: {
|
|
1582
|
+
type: string;
|
|
1583
|
+
minimum: number;
|
|
1584
|
+
description: string;
|
|
1585
|
+
};
|
|
1586
|
+
renewalPaused: {
|
|
1587
|
+
type: string;
|
|
1588
|
+
description: string;
|
|
1589
|
+
};
|
|
1590
|
+
samples: {
|
|
1591
|
+
type: string;
|
|
1592
|
+
maxItems: number;
|
|
1593
|
+
items: {
|
|
1594
|
+
$ref: string;
|
|
1595
|
+
};
|
|
1596
|
+
description: string;
|
|
1597
|
+
};
|
|
745
1598
|
};
|
|
746
1599
|
};
|
|
747
1600
|
};
|
|
@@ -751,4 +1604,4 @@ declare function latencyBucket(ms: number): number;
|
|
|
751
1604
|
/** Index of the bucket a call count falls into: first boundary >= count, else the open-ended last bucket. */
|
|
752
1605
|
declare function callsPerRequestBucket(calls: number): number;
|
|
753
1606
|
//#endregion
|
|
754
|
-
export { ACCEPTED_PROTOCOL_VERSIONS_V0, AGGREGATES_PATH, AGGREGATES_SCHEMA_V0, type AgentInfo, type AggregatesBatch, CALLS_PER_REQUEST_BOUNDARIES_V0, CALLS_PER_REQUEST_BUCKETS_V0, type Dependency, type DeployInfo, type Endpoint, type InstanceInfo, type Interval, LATENCY_BOUNDARIES_V0, LATENCY_BUCKETS_V0, type LatencyHistogram, PROTOCOL_VERSION, type PostgresStats, type RuntimeHealth, type StatusClasses, callsPerRequestBucket, latencyBucket };
|
|
1607
|
+
export { ACCEPTED_PROTOCOL_VERSIONS_V0, AGGREGATES_PATH, AGGREGATES_SCHEMA_V0, type AgentInfo, type AgentResources, type AggregatesBatch, CALLS_PER_REQUEST_BOUNDARIES_V0, CALLS_PER_REQUEST_BUCKETS_V0, CAPTURE_EVIDENCE_PATH, CAPTURE_EVIDENCE_SCHEMA_V0, type CaptureCoverage, type CaptureEvidence, type CaptureProgress, type CapturedOperation, type CapturedRequest, type Dependency, type DeployInfo, type Endpoint, INGEST_RESPONSE_SCHEMA_V0, type IngestResponse, type InstanceInfo, type Interval, LATENCY_BOUNDARIES_V0, LATENCY_BUCKETS_V0, type LatencyHistogram, type LocalTrigger, type ObserverState, type Observers, type Operation, PROTOCOL_VERSION, type PendingCapture, type PostgresStats, type Profile, type ProfileEndpoint, type RuntimeHealth, type StatusClasses, callsPerRequestBucket, captureEvidencePath, latencyBucket };
|