@neat.is/core 0.4.22 → 0.4.24-dev.20260701
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/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
routeSpanToProject,
|
|
3
3
|
startDaemon
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IABNGQT2.js";
|
|
5
5
|
import {
|
|
6
6
|
ProjectNameCollisionError,
|
|
7
7
|
addProject,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
thresholdForEdgeType,
|
|
38
38
|
touchLastSeen,
|
|
39
39
|
writeAtomically
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-O25KZNZK.js";
|
|
41
41
|
import {
|
|
42
42
|
startOtelGrpcReceiver
|
|
43
43
|
} from "./chunk-GAFTW2OX.js";
|
package/dist/neatd.cjs
CHANGED
|
@@ -2578,6 +2578,22 @@ async function recordFailingResponseIncident(ctx, span, affectedNode, timestamp,
|
|
|
2578
2578
|
};
|
|
2579
2579
|
await appendErrorEvent(ctx, ev);
|
|
2580
2580
|
}
|
|
2581
|
+
async function recordExceptionIncident(ctx, span, ts) {
|
|
2582
|
+
const attrs = sanitizeAttributes(span.attributes);
|
|
2583
|
+
const ev = {
|
|
2584
|
+
id: `${span.traceId}:${span.spanId}`,
|
|
2585
|
+
timestamp: ts,
|
|
2586
|
+
service: span.service,
|
|
2587
|
+
traceId: span.traceId,
|
|
2588
|
+
spanId: span.spanId,
|
|
2589
|
+
errorMessage: incidentMessage(span),
|
|
2590
|
+
...span.exception?.type ? { exceptionType: span.exception.type } : {},
|
|
2591
|
+
...span.exception?.stacktrace ? { exceptionStacktrace: span.exception.stacktrace } : {},
|
|
2592
|
+
...Object.keys(attrs).length > 0 ? { attributes: attrs } : {},
|
|
2593
|
+
affectedNode: incidentAffectedNode(span, ctx.graph, ctx.scanPath)
|
|
2594
|
+
};
|
|
2595
|
+
await appendErrorEvent(ctx, ev);
|
|
2596
|
+
}
|
|
2581
2597
|
async function advance4xxBurst(ctx, span, affectedNode, ts, nowMs, status2) {
|
|
2582
2598
|
const { threshold, windowMs } = loadIncidentThresholdsFromEnv();
|
|
2583
2599
|
if (!ctx.burstState) ctx.burstState = /* @__PURE__ */ new Map();
|
|
@@ -2734,7 +2750,9 @@ async function handleSpan(ctx, span) {
|
|
|
2734
2750
|
}
|
|
2735
2751
|
if (span.statusCode !== 2) {
|
|
2736
2752
|
const status2 = httpResponseStatus(span);
|
|
2737
|
-
if (
|
|
2753
|
+
if (span.exception) {
|
|
2754
|
+
await recordExceptionIncident(ctx, span, ts);
|
|
2755
|
+
} else if (status2 !== void 0 && status2 >= 500) {
|
|
2738
2756
|
await recordFailingResponseIncident(ctx, span, sourceId, ts, status2, 1);
|
|
2739
2757
|
} else if (status2 !== void 0 && status2 >= 400 && spanMintsObservedEdge(span.kind)) {
|
|
2740
2758
|
await advance4xxBurst(ctx, span, sourceId, ts, nowMs, status2);
|