@neat.is/core 0.9.10 → 0.9.11

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/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  routeSpanToProject,
3
3
  startDaemon
4
- } from "./chunk-UHNE7LGF.js";
4
+ } from "./chunk-UNO3X6ZV.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-C3LHXC55.js";
40
+ } from "./chunk-3UAUMPIY.js";
41
41
  import {
42
42
  startOtelGrpcReceiver
43
43
  } from "./chunk-ERE47MCR.js";
package/dist/neatd.cjs CHANGED
@@ -6530,6 +6530,7 @@ function buildErrorEventForReceiver(span, graph, scanPath) {
6530
6530
  const ts = span.startTimeIso ?? (/* @__PURE__ */ new Date()).toISOString();
6531
6531
  const locus = incidentLocus(span, graph, scanPath);
6532
6532
  const attrs = withRecoveredCodeAttrs(sanitizeAttributes(span.attributes), locus);
6533
+ const httpStatus = httpResponseStatus(span);
6533
6534
  return {
6534
6535
  id: `${span.traceId}:${span.spanId}`,
6535
6536
  timestamp: ts,
@@ -6539,6 +6540,7 @@ function buildErrorEventForReceiver(span, graph, scanPath) {
6539
6540
  errorMessage: incidentMessage(span),
6540
6541
  ...span.exception?.type ? { exceptionType: span.exception.type } : {},
6541
6542
  ...span.exception?.stacktrace ? { exceptionStacktrace: span.exception.stacktrace } : {},
6543
+ ...httpStatus !== void 0 ? { httpStatusCode: httpStatus } : {},
6542
6544
  ...Object.keys(attrs).length > 0 ? { attributes: attrs } : {},
6543
6545
  affectedNode: locus.affectedNode
6544
6546
  };
@@ -6890,26 +6892,8 @@ async function handleSpan(ctx, span) {
6890
6892
  if (span.statusCode === 2) {
6891
6893
  stitchTrace(ctx.graph, sourceId, ts);
6892
6894
  if (ctx.writeErrorEventInline !== false) {
6893
- const locus = incidentLocus(span, ctx.graph, ctx.scanPath);
6894
- const attrs = withRecoveredCodeAttrs(sanitizeAttributes(span.attributes), locus);
6895
- const ev = {
6896
- id: `${span.traceId}:${span.spanId}`,
6897
- timestamp: ts,
6898
- service: span.service,
6899
- traceId: span.traceId,
6900
- spanId: span.spanId,
6901
- errorMessage: incidentMessage(span),
6902
- ...span.exception?.type ? { exceptionType: span.exception.type } : {},
6903
- ...span.exception?.stacktrace ? { exceptionStacktrace: span.exception.stacktrace } : {},
6904
- ...Object.keys(attrs).length > 0 ? { attributes: attrs } : {},
6905
- // Attribute to where the failure originated — the symbol / file / service
6906
- // the throwing span named (incidentAffectedNode / ADR-191, extended to
6907
- // recover the locus from the stacktrace when the span stamped no code.*
6908
- // attrs, ADR-216) — the same source-based attribution the durable
6909
- // receiver write uses, not the outbound edge target this span minted.
6910
- affectedNode: locus.affectedNode
6911
- };
6912
- await appendErrorEvent(ctx, ev);
6895
+ const ev = buildErrorEventForReceiver(span, ctx.graph, ctx.scanPath);
6896
+ if (ev) await appendErrorEvent(ctx, ev);
6913
6897
  }
6914
6898
  }
6915
6899
  if (span.statusCode !== 2) {