@neat.is/core 0.4.20-dev.20260620 → 0.4.20-dev.20260621
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-ZV7GHZ2D.js → chunk-IWGDXLXA.js} +2 -2
- package/dist/{chunk-Q5EDVWKZ.js → chunk-RVOCG6UZ.js} +18 -6
- package/dist/chunk-RVOCG6UZ.js.map +1 -0
- package/dist/cli.cjs +20 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +7 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +16 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/neatd.cjs +16 -5
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +2 -2
- package/dist/server.cjs +16 -5
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-Q5EDVWKZ.js.map +0 -1
- /package/dist/{chunk-ZV7GHZ2D.js.map → chunk-IWGDXLXA.js.map} +0 -0
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
startPersistLoop,
|
|
19
19
|
touchLastSeen,
|
|
20
20
|
writeAtomically
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RVOCG6UZ.js";
|
|
22
22
|
import {
|
|
23
23
|
assertBindAuthority,
|
|
24
24
|
buildOtelReceiver,
|
|
@@ -745,4 +745,4 @@ export {
|
|
|
745
745
|
routeSpanToProject,
|
|
746
746
|
startDaemon
|
|
747
747
|
};
|
|
748
|
-
//# sourceMappingURL=chunk-
|
|
748
|
+
//# sourceMappingURL=chunk-IWGDXLXA.js.map
|
|
@@ -1320,13 +1320,14 @@ var parentSpanCache = /* @__PURE__ */ new Map();
|
|
|
1320
1320
|
function parentSpanKey(traceId, spanId) {
|
|
1321
1321
|
return `${traceId}:${spanId}`;
|
|
1322
1322
|
}
|
|
1323
|
-
function cacheSpanService(span, now) {
|
|
1323
|
+
function cacheSpanService(span, now, callSite) {
|
|
1324
1324
|
if (!span.traceId || !span.spanId) return;
|
|
1325
1325
|
const key = parentSpanKey(span.traceId, span.spanId);
|
|
1326
1326
|
parentSpanCache.delete(key);
|
|
1327
1327
|
parentSpanCache.set(key, {
|
|
1328
1328
|
service: span.service,
|
|
1329
1329
|
env: span.env ?? "unknown",
|
|
1330
|
+
...callSite ? { callSite } : {},
|
|
1330
1331
|
expiresAt: now + PARENT_SPAN_CACHE_TTL_MS
|
|
1331
1332
|
});
|
|
1332
1333
|
while (parentSpanCache.size > PARENT_SPAN_CACHE_SIZE) {
|
|
@@ -1342,7 +1343,11 @@ function lookupParentSpan(traceId, parentSpanId, now) {
|
|
|
1342
1343
|
parentSpanCache.delete(parentSpanKey(traceId, parentSpanId));
|
|
1343
1344
|
return null;
|
|
1344
1345
|
}
|
|
1345
|
-
return {
|
|
1346
|
+
return {
|
|
1347
|
+
service: entry.service,
|
|
1348
|
+
env: entry.env,
|
|
1349
|
+
...entry.callSite ? { callSite: entry.callSite } : {}
|
|
1350
|
+
};
|
|
1346
1351
|
}
|
|
1347
1352
|
function resolveServiceId(graph, host, env) {
|
|
1348
1353
|
const envTagged = serviceId(host, env);
|
|
@@ -1615,9 +1620,9 @@ async function handleSpan(ctx, span) {
|
|
|
1615
1620
|
}
|
|
1616
1621
|
const sourceId = ensureServiceNode(ctx.graph, span.service, env);
|
|
1617
1622
|
const isError = span.statusCode === 2;
|
|
1618
|
-
cacheSpanService(span, nowMs);
|
|
1619
1623
|
const sourceServiceNode = ctx.graph.getNodeAttributes(sourceId);
|
|
1620
1624
|
const callSite = callSiteFromSpan(span, sourceServiceNode, ctx.scanPath);
|
|
1625
|
+
cacheSpanService(span, nowMs, callSite);
|
|
1621
1626
|
const observedSource = () => callSite ? ensureObservedFileNode(ctx.graph, span.service, sourceId, callSite) : sourceId;
|
|
1622
1627
|
const callSiteEvidence = callSite ? { file: callSite.relPath, ...callSite.line !== void 0 ? { line: callSite.line } : {} } : void 0;
|
|
1623
1628
|
let affectedNode = sourceId;
|
|
@@ -1674,13 +1679,19 @@ async function handleSpan(ctx, span) {
|
|
|
1674
1679
|
const parent = lookupParentSpan(span.traceId, span.parentSpanId, nowMs);
|
|
1675
1680
|
if (parent && parent.service !== span.service) {
|
|
1676
1681
|
const parentId = ensureServiceNode(ctx.graph, parent.service, parent.env);
|
|
1682
|
+
const fallbackSource = parent.callSite ? ensureObservedFileNode(ctx.graph, parent.service, parentId, parent.callSite) : parentId;
|
|
1683
|
+
const fallbackEvidence = parent.callSite ? {
|
|
1684
|
+
file: parent.callSite.relPath,
|
|
1685
|
+
...parent.callSite.line !== void 0 ? { line: parent.callSite.line } : {}
|
|
1686
|
+
} : void 0;
|
|
1677
1687
|
upsertObservedEdge(
|
|
1678
1688
|
ctx.graph,
|
|
1679
1689
|
EdgeType3.CALLS,
|
|
1680
|
-
|
|
1690
|
+
fallbackSource,
|
|
1681
1691
|
sourceId,
|
|
1682
1692
|
ts,
|
|
1683
|
-
isError
|
|
1693
|
+
isError,
|
|
1694
|
+
fallbackEvidence
|
|
1684
1695
|
);
|
|
1685
1696
|
}
|
|
1686
1697
|
}
|
|
@@ -6588,6 +6599,7 @@ export {
|
|
|
6588
6599
|
retireEdgesByFile,
|
|
6589
6600
|
extractFromDirectory,
|
|
6590
6601
|
computeDivergences,
|
|
6602
|
+
SCHEMA_VERSION,
|
|
6591
6603
|
saveGraphToDisk,
|
|
6592
6604
|
loadGraphFromDisk,
|
|
6593
6605
|
startPersistLoop,
|
|
@@ -6617,4 +6629,4 @@ export {
|
|
|
6617
6629
|
pruneRegistry,
|
|
6618
6630
|
buildApi
|
|
6619
6631
|
};
|
|
6620
|
-
//# sourceMappingURL=chunk-
|
|
6632
|
+
//# sourceMappingURL=chunk-RVOCG6UZ.js.map
|