@fougere/observability 0.9.2-alpha.0 → 0.10.0-alpha.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/dist/OtlpExporter.d.ts +12 -0
- package/dist/OtlpExporter.d.ts.map +1 -0
- package/dist/{otlp.js → OtlpExporter.js} +9 -4
- package/dist/OtlpExporter.js.map +1 -0
- package/dist/{otlp.d.ts → OtlpOptions.d.ts} +2 -12
- package/dist/OtlpOptions.d.ts.map +1 -0
- package/dist/OtlpOptions.js +2 -0
- package/dist/OtlpOptions.js.map +1 -0
- package/dist/extension.d.ts +19 -0
- package/dist/extension.d.ts.map +1 -1
- package/dist/extension.js +32 -9
- package/dist/extension.js.map +1 -1
- package/dist/index.d.ts +90 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +106 -13
- package/dist/index.js.map +1 -1
- package/dist/logs/CapturedLog.d.ts +7 -0
- package/dist/logs/CapturedLog.d.ts.map +1 -0
- package/dist/logs/CapturedLog.js +2 -0
- package/dist/logs/CapturedLog.js.map +1 -0
- package/dist/logs/LogExporter.d.ts +12 -0
- package/dist/logs/LogExporter.d.ts.map +1 -0
- package/dist/{logs.js → logs/LogExporter.js} +4 -5
- package/dist/logs/LogExporter.js.map +1 -0
- package/dist/logs/LogsOptions.d.ts +13 -0
- package/dist/logs/LogsOptions.d.ts.map +1 -0
- package/dist/logs/LogsOptions.js +2 -0
- package/dist/logs/LogsOptions.js.map +1 -0
- package/dist/metrics/Bucketed.d.ts +16 -0
- package/dist/metrics/Bucketed.d.ts.map +1 -0
- package/dist/metrics/Bucketed.js +2 -0
- package/dist/metrics/Bucketed.js.map +1 -0
- package/dist/metrics/Metrics.d.ts +42 -0
- package/dist/metrics/Metrics.d.ts.map +1 -0
- package/dist/{metrics.js → metrics/Metrics.js} +97 -28
- package/dist/metrics/Metrics.js.map +1 -0
- package/dist/metrics/MetricsSnapshot.d.ts +14 -0
- package/dist/metrics/MetricsSnapshot.d.ts.map +1 -0
- package/dist/metrics/MetricsSnapshot.js +2 -0
- package/dist/metrics/MetricsSnapshot.js.map +1 -0
- package/dist/otlp/OtlpExporter.d.ts +12 -0
- package/dist/otlp/OtlpExporter.d.ts.map +1 -0
- package/dist/otlp/OtlpExporter.js +64 -0
- package/dist/otlp/OtlpExporter.js.map +1 -0
- package/dist/otlp/OtlpOptions.d.ts +16 -0
- package/dist/otlp/OtlpOptions.d.ts.map +1 -0
- package/dist/otlp/OtlpOptions.js +2 -0
- package/dist/otlp/OtlpOptions.js.map +1 -0
- package/package.json +14 -7
- package/src/{otlp.ts → OtlpExporter.ts} +12 -18
- package/src/OtlpOptions.ts +16 -0
- package/src/extension.ts +53 -9
- package/src/index.ts +189 -14
- package/src/logs/CapturedLog.ts +7 -0
- package/src/{logs.ts → logs/LogExporter.ts} +5 -23
- package/src/logs/LogsOptions.ts +12 -0
- package/src/metrics/Bucketed.ts +15 -0
- package/src/{metrics.ts → metrics/Metrics.ts} +100 -53
- package/src/metrics/MetricsSnapshot.ts +14 -0
- package/src/otlp/OtlpExporter.ts +87 -0
- package/src/otlp/OtlpOptions.ts +16 -0
- package/dist/logs.d.ts +0 -28
- package/dist/logs.d.ts.map +0 -1
- package/dist/logs.js.map +0 -1
- package/dist/metrics.d.ts +0 -59
- package/dist/metrics.d.ts.map +0 -1
- package/dist/metrics.js.map +0 -1
- package/dist/otlp.d.ts.map +0 -1
- package/dist/otlp.js.map +0 -1
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { activeCalls, type FinishedSpan, type SpanSink } from './index.js';
|
|
1
|
+
import type { Bucketed } from './Bucketed.js';
|
|
2
|
+
import { declaredTopologyOf, type App, type Edge, type FrondPlacement, type TopologyReport } from '@fougere/core';
|
|
3
|
+
import { activeCalls, type FinishedSpan, type SpanSink } from '../index.js';
|
|
4
|
+
import type { MetricsSnapshot } from './MetricsSnapshot.js';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
|
-
* Bucket bounds in SECONDS, the
|
|
9
|
-
*
|
|
7
|
+
* Bucket bounds in SECONDS, and the operator's to choose — this is the default, not the rule.
|
|
8
|
+
*
|
|
9
|
+
* The OpenTelemetry recommendation for request durations: dense under 100 ms because that is
|
|
10
|
+
* where a healthy op lives, and open above 10 s. A system whose ops all cross two processes has
|
|
11
|
+
* its floor elsewhere and wastes half these buckets.
|
|
12
|
+
*
|
|
13
|
+
* Deliberately NOT derived per operation, though `reach` could: an explicit-bucket histogram only
|
|
14
|
+
* aggregates across series that share its bounds, so a panel asking for the p95 of the whole
|
|
15
|
+
* service — which sums over every op — would stop meaning anything, silently. One list per
|
|
16
|
+
* process is what keeps that reading honest. The number that IS per-op is the load threshold,
|
|
17
|
+
* where nothing aggregates.
|
|
10
18
|
*/
|
|
11
19
|
const BOUNDS = [0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10];
|
|
12
20
|
|
|
13
|
-
interface Bucketed {
|
|
14
|
-
frond: string | undefined;
|
|
15
|
-
entity: string;
|
|
16
|
-
operation: string;
|
|
17
|
-
error: string | undefined;
|
|
18
|
-
count: number;
|
|
19
|
-
sum: number;
|
|
20
|
-
/** One more than the bounds: the last holds everything above the highest bound. */
|
|
21
|
-
buckets: number[];
|
|
22
|
-
}
|
|
23
21
|
|
|
24
22
|
export interface Metrics {
|
|
25
23
|
/** Hand to `onSpan` — it reads the same span the tracer reads. */
|
|
@@ -28,24 +26,11 @@ export interface Metrics {
|
|
|
28
26
|
snapshot(): MetricsSnapshot;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
export interface MetricsSnapshot {
|
|
33
|
-
/** When this process started counting — cumulative metrics are read against it. */
|
|
34
|
-
since: number;
|
|
35
|
-
series: Bucketed[];
|
|
36
|
-
active: number;
|
|
37
|
-
bounds: number[];
|
|
38
|
-
/** The shape of the system as this process discovered it — declared nowhere. */
|
|
39
|
-
topology: FrondPlacement[];
|
|
40
|
-
/** Who calls whom, as observed here. Bounded by fronds², so it is a safe dimension. */
|
|
41
|
-
edges: Edge[];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
29
|
/**
|
|
45
30
|
* `app` is optional and only feeds the topology: what fronds this process found, and which of them
|
|
46
31
|
* run elsewhere.
|
|
47
32
|
*/
|
|
48
|
-
export function metrics(app?: App): Metrics {
|
|
33
|
+
export function metrics(app?: App, bounds: readonly number[] = BOUNDS): Metrics {
|
|
49
34
|
const since = Date.now();
|
|
50
35
|
const series = new Map<string, Bucketed>();
|
|
51
36
|
/** Every frond this process has actually CALLED — the other half of the topology. */
|
|
@@ -55,6 +40,11 @@ export function metrics(app?: App): Metrics {
|
|
|
55
40
|
|
|
56
41
|
return {
|
|
57
42
|
sink: (span: FinishedSpan) => {
|
|
43
|
+
// The one reader that has to choose: a statement is a step, not a call this process
|
|
44
|
+
// answered. Counted here it would publish `select.post` as an operation nothing
|
|
45
|
+
// serves, and every topology and saturation figure would count it too.
|
|
46
|
+
if (span.kind !== 'operation') return;
|
|
47
|
+
|
|
58
48
|
const key = `${span.entity}\0${span.operation}\0${span.error ?? ''}`;
|
|
59
49
|
let row = series.get(key);
|
|
60
50
|
if (!row) {
|
|
@@ -65,7 +55,10 @@ export function metrics(app?: App): Metrics {
|
|
|
65
55
|
error: span.error,
|
|
66
56
|
count: 0,
|
|
67
57
|
sum: 0,
|
|
68
|
-
buckets: new Array(
|
|
58
|
+
buckets: new Array(bounds.length + 1).fill(0),
|
|
59
|
+
selfSum: 0,
|
|
60
|
+
selfBuckets: new Array(bounds.length + 1).fill(0),
|
|
61
|
+
statements: 0,
|
|
69
62
|
};
|
|
70
63
|
series.set(key, row);
|
|
71
64
|
}
|
|
@@ -80,13 +73,18 @@ export function metrics(app?: App): Metrics {
|
|
|
80
73
|
const seconds = span.ms / 1000;
|
|
81
74
|
row.count += 1;
|
|
82
75
|
row.sum += seconds;
|
|
83
|
-
row.buckets[bucketOf(seconds)] += 1;
|
|
76
|
+
row.buckets[bucketOf(seconds, bounds)] += 1;
|
|
77
|
+
|
|
78
|
+
const self = span.selfMs / 1000;
|
|
79
|
+
row.selfSum += self;
|
|
80
|
+
row.selfBuckets[bucketOf(self, bounds)] += 1;
|
|
81
|
+
row.statements += span.statements;
|
|
84
82
|
},
|
|
85
83
|
snapshot: () => ({
|
|
86
84
|
since,
|
|
87
85
|
series: [...series.values()],
|
|
88
86
|
active: activeCalls(),
|
|
89
|
-
bounds:
|
|
87
|
+
bounds: [...bounds],
|
|
90
88
|
topology: topologyOf(app, seen),
|
|
91
89
|
edges: [...edges.values()],
|
|
92
90
|
}),
|
|
@@ -100,37 +98,50 @@ export function metrics(app?: App): Metrics {
|
|
|
100
98
|
function topologyOf(app: App | undefined, seen: Set<string>): FrondPlacement[] {
|
|
101
99
|
// What the app SERVES: a frond an extension brought is instrumentation, and reporting it
|
|
102
100
|
// would describe this package to itself.
|
|
101
|
+
//
|
|
102
|
+
// A frond named in `remotes:` is scanned when its code sits in the same project, and stays
|
|
103
|
+
// in `app.fronds` — the boot says `declared remote — not hosted locally` and keeps it. This
|
|
104
|
+
// half reports what RUNS here, so it is not one of them: it used to answer `local` for a
|
|
105
|
+
// frond every call reached over HTTP. Not a config-derived node either — it is named below
|
|
106
|
+
// only once it has answered, like any other remote.
|
|
103
107
|
const local = new Map((app?.fronds ?? [])
|
|
104
|
-
.filter((frond) => !frond.brought)
|
|
108
|
+
.filter((frond) => !frond.brought && !app?.remotes[frond.name])
|
|
105
109
|
.map((frond) => [frond.name, frond] as const));
|
|
106
110
|
|
|
107
111
|
const here: FrondPlacement[] = [...local.values()].map((frond) => ({
|
|
108
112
|
frond: frond.name,
|
|
109
113
|
placement: 'local' as const,
|
|
110
114
|
entities: frond.entities.length,
|
|
111
|
-
|
|
115
|
+
facades: frond.handlers.length,
|
|
112
116
|
}));
|
|
113
117
|
|
|
114
118
|
// A frond we called but never scanned is hosted elsewhere. Its shape is not ours to
|
|
115
119
|
// report — it is published by the process that owns it, under its own service name.
|
|
116
120
|
const elsewhere: FrondPlacement[] = [...seen]
|
|
117
121
|
.filter((name) => !local.has(name))
|
|
118
|
-
.map((name) => ({ frond: name, placement: 'remote' as const, entities: 0,
|
|
122
|
+
.map((name) => ({ frond: name, placement: 'remote' as const, entities: 0, facades: 0 }));
|
|
119
123
|
|
|
120
124
|
return [...here, ...elsewhere];
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
/** The first bound this duration does not exceed, or the overflow bucket. */
|
|
124
|
-
function bucketOf(seconds: number): number {
|
|
125
|
-
for (let i = 0; i <
|
|
126
|
-
|
|
128
|
+
function bucketOf(seconds: number, bounds: readonly number[]): number {
|
|
129
|
+
for (let i = 0; i < bounds.length; i++) if (seconds <= bounds[i]!) return i;
|
|
130
|
+
|
|
131
|
+
return bounds.length;
|
|
127
132
|
}
|
|
128
133
|
|
|
129
|
-
/**
|
|
134
|
+
/**
|
|
135
|
+
* Serve the topology on `rpc.topology` — read from inside the process it describes.
|
|
136
|
+
*
|
|
137
|
+
* The declared half is read at every call rather than once here: `reloadFougere()` builds the app
|
|
138
|
+
* again, and a config read at boot would keep answering for the app that was released.
|
|
139
|
+
*/
|
|
130
140
|
export function serveTopology(app: App, measured: Metrics): void {
|
|
131
141
|
app.serveRpc('topology', (): TopologyReport => {
|
|
132
142
|
const { since, active, topology, edges } = measured.snapshot();
|
|
133
|
-
|
|
143
|
+
|
|
144
|
+
return { since, active, fronds: topology, edges, declared: declaredTopologyOf(app) };
|
|
134
145
|
});
|
|
135
146
|
}
|
|
136
147
|
|
|
@@ -139,6 +150,14 @@ export function metricsPayload(service: string, snapshot: MetricsSnapshot) {
|
|
|
139
150
|
const since = `${snapshot.since * 1e6}`;
|
|
140
151
|
const now = `${Date.now() * 1e6}`;
|
|
141
152
|
const attr = (key: string, value: string) => ({ key, value: { stringValue: value } });
|
|
153
|
+
/** What an operation's three series are all sliced by — said once, so they stay comparable. */
|
|
154
|
+
const dimensions = (row: Bucketed) => [
|
|
155
|
+
...(row.frond ? [attr('fougere.frond', row.frond)] : []),
|
|
156
|
+
attr('fougere.entity', row.entity),
|
|
157
|
+
attr('fougere.operation', row.operation),
|
|
158
|
+
attr('fougere.outcome', row.error ? 'error' : 'ok'),
|
|
159
|
+
...(row.error ? [attr('fougere.error.code', row.error)] : []),
|
|
160
|
+
];
|
|
142
161
|
|
|
143
162
|
return {
|
|
144
163
|
resourceMetrics: [
|
|
@@ -158,13 +177,7 @@ export function metricsPayload(service: string, snapshot: MetricsSnapshot) {
|
|
|
158
177
|
// only temporality Prometheus reads without a collector in between.
|
|
159
178
|
aggregationTemporality: 2,
|
|
160
179
|
dataPoints: snapshot.series.map((row) => ({
|
|
161
|
-
attributes:
|
|
162
|
-
...(row.frond ? [attr('fougere.frond', row.frond)] : []),
|
|
163
|
-
attr('fougere.entity', row.entity),
|
|
164
|
-
attr('fougere.operation', row.operation),
|
|
165
|
-
attr('fougere.outcome', row.error ? 'error' : 'ok'),
|
|
166
|
-
...(row.error ? [attr('fougere.error.code', row.error)] : []),
|
|
167
|
-
],
|
|
180
|
+
attributes: dimensions(row),
|
|
168
181
|
startTimeUnixNano: since,
|
|
169
182
|
timeUnixNano: now,
|
|
170
183
|
count: `${row.count}`,
|
|
@@ -174,6 +187,40 @@ export function metricsPayload(service: string, snapshot: MetricsSnapshot) {
|
|
|
174
187
|
})),
|
|
175
188
|
},
|
|
176
189
|
},
|
|
190
|
+
{
|
|
191
|
+
name: 'fougere.operation.self',
|
|
192
|
+
description: 'How long an operation took on its own, with what it waited for taken out.',
|
|
193
|
+
unit: 's',
|
|
194
|
+
histogram: {
|
|
195
|
+
aggregationTemporality: 2,
|
|
196
|
+
dataPoints: snapshot.series.map((row) => ({
|
|
197
|
+
attributes: dimensions(row),
|
|
198
|
+
startTimeUnixNano: since,
|
|
199
|
+
timeUnixNano: now,
|
|
200
|
+
count: `${row.count}`,
|
|
201
|
+
sum: row.selfSum,
|
|
202
|
+
bucketCounts: row.selfBuckets.map((n) => `${n}`),
|
|
203
|
+
explicitBounds: snapshot.bounds,
|
|
204
|
+
})),
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: 'fougere.operation.statements',
|
|
209
|
+
description: 'Statements run under an operation. Against its count, statements per call.',
|
|
210
|
+
unit: '{statement}',
|
|
211
|
+
sum: {
|
|
212
|
+
aggregationTemporality: 2,
|
|
213
|
+
isMonotonic: true,
|
|
214
|
+
dataPoints: snapshot.series
|
|
215
|
+
.filter((row) => row.statements > 0)
|
|
216
|
+
.map((row) => ({
|
|
217
|
+
attributes: dimensions(row),
|
|
218
|
+
startTimeUnixNano: since,
|
|
219
|
+
timeUnixNano: now,
|
|
220
|
+
asInt: `${row.statements}`,
|
|
221
|
+
})),
|
|
222
|
+
},
|
|
223
|
+
},
|
|
177
224
|
{
|
|
178
225
|
name: 'fougere.operations.active',
|
|
179
226
|
description: 'Operations running right now — the saturation signal.',
|
|
@@ -226,13 +273,13 @@ export function metricsPayload(service: string, snapshot: MetricsSnapshot) {
|
|
|
226
273
|
},
|
|
227
274
|
},
|
|
228
275
|
{
|
|
229
|
-
name: 'fougere.frond.
|
|
230
|
-
description: 'How many
|
|
231
|
-
unit: '{
|
|
276
|
+
name: 'fougere.frond.facades',
|
|
277
|
+
description: 'How many facades a frond serves — its surface, as scanned.',
|
|
278
|
+
unit: '{facade}',
|
|
232
279
|
gauge: {
|
|
233
280
|
dataPoints: snapshot.topology.map((f) => ({
|
|
234
281
|
attributes: [attr('fougere.frond', f.frond)],
|
|
235
|
-
asInt: `${f.
|
|
282
|
+
asInt: `${f.facades}`,
|
|
236
283
|
timeUnixNano: now,
|
|
237
284
|
})),
|
|
238
285
|
},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Bucketed } from './Bucketed.js';
|
|
2
|
+
import { type Edge, type FrondPlacement } from '@fougere/core';
|
|
3
|
+
|
|
4
|
+
export interface MetricsSnapshot {
|
|
5
|
+
/** When this process started counting — cumulative metrics are read against it. */
|
|
6
|
+
since: number;
|
|
7
|
+
series: Bucketed[];
|
|
8
|
+
active: number;
|
|
9
|
+
bounds: number[];
|
|
10
|
+
/** The shape of the system as this process discovered it — declared nowhere. */
|
|
11
|
+
topology: FrondPlacement[];
|
|
12
|
+
/** Who calls whom, as observed here. Bounded by fronds², so it is a safe dimension. */
|
|
13
|
+
edges: Edge[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Beat } from '../Beat.js';
|
|
2
|
+
import { Endpoint } from '../Endpoint.js';
|
|
3
|
+
import type { FinishedSpan, SpanSink } from '../index.js';
|
|
4
|
+
import { metricsPayload } from '../metrics/Metrics.js';
|
|
5
|
+
import type { OtlpOptions } from './OtlpOptions.js';
|
|
6
|
+
|
|
7
|
+
export interface OtlpExporter {
|
|
8
|
+
/** Hand to `onSpan`. */
|
|
9
|
+
sink: SpanSink;
|
|
10
|
+
/** Send what is buffered now — a process about to exit has to call this. */
|
|
11
|
+
flush(): Promise<void>;
|
|
12
|
+
/** Stop the timer and send what is left. */
|
|
13
|
+
stop(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** OTLP status codes: 0 unset, 1 ok, 2 error. */
|
|
17
|
+
const OK = 1;
|
|
18
|
+
|
|
19
|
+
const ERROR = 2;
|
|
20
|
+
|
|
21
|
+
/** OTLP span kinds, of the six only these two are ours. */
|
|
22
|
+
const INTERNAL = 1;
|
|
23
|
+
|
|
24
|
+
const CLIENT = 3;
|
|
25
|
+
|
|
26
|
+
export function otlp(options: OtlpOptions): OtlpExporter {
|
|
27
|
+
const url = options.url ?? 'http://localhost:4318/v1/traces';
|
|
28
|
+
const traces = Endpoint.at(url, options.onError);
|
|
29
|
+
const metrics = Endpoint.at(
|
|
30
|
+
options.metricsUrl ?? url.replace(/\/v1\/traces$/, '/v1/metrics'),
|
|
31
|
+
options.onError,
|
|
32
|
+
);
|
|
33
|
+
let buffer: FinishedSpan[] = [];
|
|
34
|
+
|
|
35
|
+
async function flush(): Promise<void> {
|
|
36
|
+
const batch = buffer;
|
|
37
|
+
buffer = [];
|
|
38
|
+
// Metrics go on every beat even when no span finished: a gauge that stops being
|
|
39
|
+
// published reads as "gone", not as "idle".
|
|
40
|
+
await Promise.all([
|
|
41
|
+
batch.length > 0 ? traces.post(payload(options.service, batch)) : Promise.resolve(),
|
|
42
|
+
options.metrics ? metrics.post(metricsPayload(options.service, options.metrics.snapshot())) : Promise.resolve(),
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const beat = Beat.every(options.flushMs, flush);
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
sink: (span) => { buffer.push(span); },
|
|
50
|
+
flush,
|
|
51
|
+
stop: () => beat.stop(),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** One batch, as OTLP/JSON spells it — trace and span ids stay hex, times are nanos. */
|
|
56
|
+
function payload(service: string, spans: FinishedSpan[]) {
|
|
57
|
+
return {
|
|
58
|
+
resourceSpans: [
|
|
59
|
+
{
|
|
60
|
+
resource: { attributes: [{ key: 'service.name', value: { stringValue: service } }] },
|
|
61
|
+
scopeSpans: [
|
|
62
|
+
{
|
|
63
|
+
scope: { name: '@fougere/observability' },
|
|
64
|
+
spans: spans.map((span) => ({
|
|
65
|
+
traceId: span.traceId,
|
|
66
|
+
spanId: span.spanId,
|
|
67
|
+
...(span.parentId ? { parentSpanId: span.parentId } : {}),
|
|
68
|
+
name: `${span.entity}.${span.operation}`,
|
|
69
|
+
// 1 INTERNAL, 3 CLIENT: a statement left this process for an engine, and a
|
|
70
|
+
// viewer draws the two differently. `selfMs` is NOT sent — a collector
|
|
71
|
+
// derives it from the tree it already holds.
|
|
72
|
+
kind: span.kind === 'statement' ? CLIENT : INTERNAL,
|
|
73
|
+
startTimeUnixNano: nanos(span.startedAt),
|
|
74
|
+
endTimeUnixNano: nanos(span.startedAt + span.ms),
|
|
75
|
+
status: span.error ? { code: ERROR, message: span.error } : { code: OK },
|
|
76
|
+
})),
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Epoch milliseconds → the int64 nanoseconds OTLP wants, as a string. */
|
|
85
|
+
function nanos(ms: number): string {
|
|
86
|
+
return `${Math.round(ms * 1e6)}`;
|
|
87
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Metrics } from '../metrics/Metrics.js';
|
|
2
|
+
|
|
3
|
+
export interface OtlpOptions {
|
|
4
|
+
/** Which service these spans belong to — what a dashboard groups by. */
|
|
5
|
+
service: string;
|
|
6
|
+
/** Collector endpoint. Default: the OTLP/HTTP convention on localhost. */
|
|
7
|
+
url?: string;
|
|
8
|
+
/** How often a full batch leaves. Default: every second. */
|
|
9
|
+
flushMs?: number;
|
|
10
|
+
/** Told when a batch could not be sent. Default: silence — a trace must never break a call. */
|
|
11
|
+
onError?: (err: unknown) => void;
|
|
12
|
+
/** Publish these metrics on the same beat. */
|
|
13
|
+
metrics?: Metrics;
|
|
14
|
+
/** Where metrics go when it is not the same collector as traces. */
|
|
15
|
+
metricsUrl?: string;
|
|
16
|
+
}
|
package/dist/logs.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { LogRecord } from '@fougere/core';
|
|
2
|
-
/** A record, plus what it could only be told at the moment it was written. */
|
|
3
|
-
export interface CapturedLog extends LogRecord {
|
|
4
|
-
traceId: string | undefined;
|
|
5
|
-
spanId: string | undefined;
|
|
6
|
-
}
|
|
7
|
-
export interface LogExporter {
|
|
8
|
-
/** Hand to `onLog`. */
|
|
9
|
-
sink: (record: LogRecord) => void;
|
|
10
|
-
/** Send what is buffered now. */
|
|
11
|
-
flush(): Promise<void>;
|
|
12
|
-
/** Stop the timer and send what is left. */
|
|
13
|
-
stop(): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
export interface LogsOptions {
|
|
16
|
-
/** Which service these lines belong to. */
|
|
17
|
-
service: string;
|
|
18
|
-
/** Collector endpoint. Default: the OTLP/HTTP convention on localhost. */
|
|
19
|
-
url?: string;
|
|
20
|
-
/** How often a batch leaves. Default: every second. */
|
|
21
|
-
flushMs?: number;
|
|
22
|
-
/** Told when a batch could not be sent. Default: silence. */
|
|
23
|
-
onError?: (err: unknown) => void;
|
|
24
|
-
/** Drop anything below this level before it leaves the process. */
|
|
25
|
-
minimum?: 'debug' | 'info' | 'warn' | 'error';
|
|
26
|
-
}
|
|
27
|
-
export declare function logs(options: LogsOptions): LogExporter;
|
|
28
|
-
//# sourceMappingURL=logs.d.ts.map
|
package/dist/logs.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../src/logs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAU/C,8EAA8E;AAC9E,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,uBAAuB;IACvB,IAAI,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IAClC,iCAAiC;IACjC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,4CAA4C;IAC5C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OA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KAAK,CAAC,OAAO,EAAE,CAAC;IACrE,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
package/dist/metrics.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/** The four signals every service is judged on, derived from the span that already exists. */
|
|
2
|
-
import type { App, Edge, FrondPlacement } from '@fougere/core';
|
|
3
|
-
export type { Edge, FrondPlacement, TopologyReport } from '@fougere/core';
|
|
4
|
-
import { type SpanSink } from './index.js';
|
|
5
|
-
interface Bucketed {
|
|
6
|
-
frond: string | undefined;
|
|
7
|
-
entity: string;
|
|
8
|
-
operation: string;
|
|
9
|
-
error: string | undefined;
|
|
10
|
-
count: number;
|
|
11
|
-
sum: number;
|
|
12
|
-
/** One more than the bounds: the last holds everything above the highest bound. */
|
|
13
|
-
buckets: number[];
|
|
14
|
-
}
|
|
15
|
-
export interface Metrics {
|
|
16
|
-
/** Hand to `onSpan` — it reads the same span the tracer reads. */
|
|
17
|
-
sink: SpanSink;
|
|
18
|
-
/** What to publish now. */
|
|
19
|
-
snapshot(): MetricsSnapshot;
|
|
20
|
-
}
|
|
21
|
-
export interface MetricsSnapshot {
|
|
22
|
-
/** When this process started counting — cumulative metrics are read against it. */
|
|
23
|
-
since: number;
|
|
24
|
-
series: Bucketed[];
|
|
25
|
-
active: number;
|
|
26
|
-
bounds: number[];
|
|
27
|
-
/** The shape of the system as this process discovered it — declared nowhere. */
|
|
28
|
-
topology: FrondPlacement[];
|
|
29
|
-
/** Who calls whom, as observed here. Bounded by fronds², so it is a safe dimension. */
|
|
30
|
-
edges: Edge[];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* `app` is optional and only feeds the topology: what fronds this process found, and which of them
|
|
34
|
-
* run elsewhere.
|
|
35
|
-
*/
|
|
36
|
-
export declare function metrics(app?: App): Metrics;
|
|
37
|
-
/** Serve the topology on `rpc.topology` — read from inside the process it describes. */
|
|
38
|
-
export declare function serveTopology(app: App, measured: Metrics): void;
|
|
39
|
-
/** One snapshot, as OTLP/JSON spells metrics. Cumulative, which is what Prometheus reads. */
|
|
40
|
-
export declare function metricsPayload(service: string, snapshot: MetricsSnapshot): {
|
|
41
|
-
resourceMetrics: {
|
|
42
|
-
resource: {
|
|
43
|
-
attributes: {
|
|
44
|
-
key: string;
|
|
45
|
-
value: {
|
|
46
|
-
stringValue: string;
|
|
47
|
-
};
|
|
48
|
-
}[];
|
|
49
|
-
};
|
|
50
|
-
scopeMetrics: {
|
|
51
|
-
scope: {
|
|
52
|
-
name: string;
|
|
53
|
-
};
|
|
54
|
-
/** Only what has points. */
|
|
55
|
-
metrics: Record<string, any>[];
|
|
56
|
-
}[];
|
|
57
|
-
}[];
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=metrics.d.ts.map
|
package/dist/metrics.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,cAAc,EAAkB,MAAM,eAAe,CAAC;AAE/E,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQ3E,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,mFAAmF;IACnF,OAA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