@neat.is/core 0.4.22 → 0.4.23
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/{chunk-XRE4OQWJ.js → chunk-IABNGQT2.js} +2 -2
- package/dist/{chunk-OQ7CHOY2.js → chunk-O25KZNZK.js} +20 -2
- package/dist/chunk-O25KZNZK.js.map +1 -0
- package/dist/cli.cjs +19 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.cjs +19 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/neatd.cjs +19 -1
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +2 -2
- package/dist/server.cjs +29 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-OQ7CHOY2.js.map +0 -1
- /package/dist/{chunk-XRE4OQWJ.js.map → chunk-IABNGQT2.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
resolveHost,
|
|
7
7
|
resolveNeatVersion,
|
|
8
8
|
writeDaemonRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IABNGQT2.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSearchIndex
|
|
12
12
|
} from "./chunk-XOOCA5T7.js";
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
signalDaemonStop,
|
|
60
60
|
startPersistLoop,
|
|
61
61
|
startStalenessLoop
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-O25KZNZK.js";
|
|
63
63
|
import {
|
|
64
64
|
startOtelGrpcReceiver
|
|
65
65
|
} from "./chunk-GAFTW2OX.js";
|
package/dist/index.cjs
CHANGED
|
@@ -2637,6 +2637,22 @@ async function recordFailingResponseIncident(ctx, span, affectedNode, timestamp,
|
|
|
2637
2637
|
};
|
|
2638
2638
|
await appendErrorEvent(ctx, ev);
|
|
2639
2639
|
}
|
|
2640
|
+
async function recordExceptionIncident(ctx, span, ts) {
|
|
2641
|
+
const attrs = sanitizeAttributes(span.attributes);
|
|
2642
|
+
const ev = {
|
|
2643
|
+
id: `${span.traceId}:${span.spanId}`,
|
|
2644
|
+
timestamp: ts,
|
|
2645
|
+
service: span.service,
|
|
2646
|
+
traceId: span.traceId,
|
|
2647
|
+
spanId: span.spanId,
|
|
2648
|
+
errorMessage: incidentMessage(span),
|
|
2649
|
+
...span.exception?.type ? { exceptionType: span.exception.type } : {},
|
|
2650
|
+
...span.exception?.stacktrace ? { exceptionStacktrace: span.exception.stacktrace } : {},
|
|
2651
|
+
...Object.keys(attrs).length > 0 ? { attributes: attrs } : {},
|
|
2652
|
+
affectedNode: incidentAffectedNode(span, ctx.graph, ctx.scanPath)
|
|
2653
|
+
};
|
|
2654
|
+
await appendErrorEvent(ctx, ev);
|
|
2655
|
+
}
|
|
2640
2656
|
async function advance4xxBurst(ctx, span, affectedNode, ts, nowMs, status2) {
|
|
2641
2657
|
const { threshold, windowMs } = loadIncidentThresholdsFromEnv();
|
|
2642
2658
|
if (!ctx.burstState) ctx.burstState = /* @__PURE__ */ new Map();
|
|
@@ -2793,7 +2809,9 @@ async function handleSpan(ctx, span) {
|
|
|
2793
2809
|
}
|
|
2794
2810
|
if (span.statusCode !== 2) {
|
|
2795
2811
|
const status2 = httpResponseStatus(span);
|
|
2796
|
-
if (
|
|
2812
|
+
if (span.exception) {
|
|
2813
|
+
await recordExceptionIncident(ctx, span, ts);
|
|
2814
|
+
} else if (status2 !== void 0 && status2 >= 500) {
|
|
2797
2815
|
await recordFailingResponseIncident(ctx, span, sourceId, ts, status2, 1);
|
|
2798
2816
|
} else if (status2 !== void 0 && status2 >= 400 && spanMintsObservedEdge(span.kind)) {
|
|
2799
2817
|
await advance4xxBurst(ctx, span, sourceId, ts, nowMs, status2);
|