@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
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
startPersistLoop,
|
|
19
19
|
touchLastSeen,
|
|
20
20
|
writeAtomically
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-O25KZNZK.js";
|
|
22
22
|
import {
|
|
23
23
|
assertBindAuthority,
|
|
24
24
|
buildOtelReceiver,
|
|
@@ -793,4 +793,4 @@ export {
|
|
|
793
793
|
resolveHost,
|
|
794
794
|
startDaemon
|
|
795
795
|
};
|
|
796
|
-
//# sourceMappingURL=chunk-
|
|
796
|
+
//# sourceMappingURL=chunk-IABNGQT2.js.map
|
|
@@ -1988,6 +1988,22 @@ async function recordFailingResponseIncident(ctx, span, affectedNode, timestamp,
|
|
|
1988
1988
|
};
|
|
1989
1989
|
await appendErrorEvent(ctx, ev);
|
|
1990
1990
|
}
|
|
1991
|
+
async function recordExceptionIncident(ctx, span, ts) {
|
|
1992
|
+
const attrs = sanitizeAttributes(span.attributes);
|
|
1993
|
+
const ev = {
|
|
1994
|
+
id: `${span.traceId}:${span.spanId}`,
|
|
1995
|
+
timestamp: ts,
|
|
1996
|
+
service: span.service,
|
|
1997
|
+
traceId: span.traceId,
|
|
1998
|
+
spanId: span.spanId,
|
|
1999
|
+
errorMessage: incidentMessage(span),
|
|
2000
|
+
...span.exception?.type ? { exceptionType: span.exception.type } : {},
|
|
2001
|
+
...span.exception?.stacktrace ? { exceptionStacktrace: span.exception.stacktrace } : {},
|
|
2002
|
+
...Object.keys(attrs).length > 0 ? { attributes: attrs } : {},
|
|
2003
|
+
affectedNode: incidentAffectedNode(span, ctx.graph, ctx.scanPath)
|
|
2004
|
+
};
|
|
2005
|
+
await appendErrorEvent(ctx, ev);
|
|
2006
|
+
}
|
|
1991
2007
|
async function advance4xxBurst(ctx, span, affectedNode, ts, nowMs, status) {
|
|
1992
2008
|
const { threshold, windowMs } = loadIncidentThresholdsFromEnv();
|
|
1993
2009
|
if (!ctx.burstState) ctx.burstState = /* @__PURE__ */ new Map();
|
|
@@ -2144,7 +2160,9 @@ async function handleSpan(ctx, span) {
|
|
|
2144
2160
|
}
|
|
2145
2161
|
if (span.statusCode !== 2) {
|
|
2146
2162
|
const status = httpResponseStatus(span);
|
|
2147
|
-
if (
|
|
2163
|
+
if (span.exception) {
|
|
2164
|
+
await recordExceptionIncident(ctx, span, ts);
|
|
2165
|
+
} else if (status !== void 0 && status >= 500) {
|
|
2148
2166
|
await recordFailingResponseIncident(ctx, span, sourceId, ts, status, 1);
|
|
2149
2167
|
} else if (status !== void 0 && status >= 400 && spanMintsObservedEdge(span.kind)) {
|
|
2150
2168
|
await advance4xxBurst(ctx, span, sourceId, ts, nowMs, status);
|
|
@@ -7344,4 +7362,4 @@ export {
|
|
|
7344
7362
|
pruneRegistry,
|
|
7345
7363
|
buildApi
|
|
7346
7364
|
};
|
|
7347
|
-
//# sourceMappingURL=chunk-
|
|
7365
|
+
//# sourceMappingURL=chunk-O25KZNZK.js.map
|