@neat.is/core 0.2.10 → 0.3.1
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-QYUB3FQL.js → chunk-4ASCXBZF.js} +12 -124
- package/dist/chunk-4ASCXBZF.js.map +1 -0
- package/dist/{chunk-5BQWBQJR.js → chunk-66Z5IEFY.js} +126 -7
- package/dist/chunk-66Z5IEFY.js.map +1 -0
- package/dist/{chunk-JMLZOKCS.js → chunk-FIXKIYNF.js} +818 -18
- package/dist/chunk-FIXKIYNF.js.map +1 -0
- package/dist/chunk-G3PDTGOW.js +125 -0
- package/dist/chunk-G3PDTGOW.js.map +1 -0
- package/dist/cli.cjs +60 -25
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +17 -15
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +186 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -12
- package/dist/index.d.ts +11 -12
- package/dist/index.js +10 -11
- package/dist/neatd.cjs +1886 -34
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +5 -3
- package/dist/neatd.js.map +1 -1
- package/dist/{otel-grpc-USFL3OI3.js → otel-grpc-J4O2SIBZ.js} +3 -3
- package/dist/server.cjs +49 -17
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +6 -7
- package/dist/server.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-5BQWBQJR.js.map +0 -1
- package/dist/chunk-DGUM43GV.js +0 -11
- package/dist/chunk-JMLZOKCS.js.map +0 -1
- package/dist/chunk-QYUB3FQL.js.map +0 -1
- package/dist/chunk-W7ZYJZC7.js +0 -807
- package/dist/chunk-W7ZYJZC7.js.map +0 -1
- package/dist/otel-grpc-USFL3OI3.js.map +0 -1
- /package/dist/{chunk-DGUM43GV.js.map → otel-grpc-J4O2SIBZ.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MultiDirectedGraph } from 'graphology';
|
|
2
|
-
import { GraphNode, GraphEdge, ErrorEvent, BlastRadiusResult, RootCauseResult, RegistryEntry, RegistryStatus, RegistryFile } from '@neat.is/types';
|
|
2
|
+
import { GraphNode, GraphEdge, StaleEvent, ErrorEvent, BlastRadiusResult, RootCauseResult, RegistryEntry, RegistryStatus, RegistryFile } from '@neat.is/types';
|
|
3
|
+
export { StaleEvent } from '@neat.is/types';
|
|
3
4
|
import { FastifyInstance } from 'fastify';
|
|
4
5
|
|
|
5
6
|
type NeatGraph = MultiDirectedGraph<GraphNode, GraphEdge>;
|
|
@@ -195,16 +196,7 @@ declare function stitchTrace(graph: NeatGraph, sourceServiceId: string, ts: stri
|
|
|
195
196
|
declare function handleSpan(ctx: IngestContext, span: ParsedSpan): Promise<void>;
|
|
196
197
|
|
|
197
198
|
declare function makeSpanHandler(ctx: IngestContext): (span: ParsedSpan) => Promise<void>;
|
|
198
|
-
|
|
199
|
-
edgeId: string;
|
|
200
|
-
source: string;
|
|
201
|
-
target: string;
|
|
202
|
-
edgeType: string;
|
|
203
|
-
thresholdMs: number;
|
|
204
|
-
ageMs: number;
|
|
205
|
-
lastObserved: string;
|
|
206
|
-
transitionedAt: string;
|
|
207
|
-
}
|
|
199
|
+
|
|
208
200
|
interface MarkStaleOptions {
|
|
209
201
|
thresholds?: Record<string, number>;
|
|
210
202
|
now?: number;
|
|
@@ -309,11 +301,16 @@ declare function computeGraphDiff(liveGraph: NeatGraph, baseSnapshot: PersistedS
|
|
|
309
301
|
|
|
310
302
|
interface DaemonOptions {
|
|
311
303
|
neatHome?: string;
|
|
304
|
+
restPort?: number;
|
|
305
|
+
otlpPort?: number;
|
|
306
|
+
host?: string;
|
|
307
|
+
bindListeners?: boolean;
|
|
312
308
|
}
|
|
313
309
|
interface ProjectSlot {
|
|
314
310
|
entry: RegistryEntry;
|
|
315
311
|
graph: NeatGraph;
|
|
316
312
|
outPath: string;
|
|
313
|
+
paths: ProjectPaths;
|
|
317
314
|
stopPersist: () => void;
|
|
318
315
|
status: 'active' | 'broken';
|
|
319
316
|
errorReason?: string;
|
|
@@ -323,6 +320,8 @@ interface DaemonHandle {
|
|
|
323
320
|
reload: () => Promise<void>;
|
|
324
321
|
stop: () => Promise<void>;
|
|
325
322
|
pidPath: string;
|
|
323
|
+
restAddress: string;
|
|
324
|
+
otlpAddress: string;
|
|
326
325
|
}
|
|
327
326
|
/**
|
|
328
327
|
* Resolve which project's graph an OTel span belongs to. Looks up the
|
|
@@ -409,4 +408,4 @@ declare function touchLastSeen(name: string, at?: string): Promise<void>;
|
|
|
409
408
|
*/
|
|
410
409
|
declare function removeProject(name: string): Promise<RegistryEntry | undefined>;
|
|
411
410
|
|
|
412
|
-
export { type BuildApiOptions, type BuildOtelGrpcReceiverOptions, type BuildOtelReceiverOptions, type CompatPair, type CompatibilityResult, type DaemonHandle, type DaemonOptions, type ExtractResult, type GraphDiff, type IngestContext, type MarkStaleOptions, type NeatGraph, type OtelGrpcReceiver, type OtlpTracesRequest, type ParsedSpan, type PersistedSnapshot, ProjectNameCollisionError, type ProjectSlot, type SpanHandler, type
|
|
411
|
+
export { type BuildApiOptions, type BuildOtelGrpcReceiverOptions, type BuildOtelReceiverOptions, type CompatPair, type CompatibilityResult, type DaemonHandle, type DaemonOptions, type ExtractResult, type GraphDiff, type IngestContext, type MarkStaleOptions, type NeatGraph, type OtelGrpcReceiver, type OtlpTracesRequest, type ParsedSpan, type PersistedSnapshot, ProjectNameCollisionError, type ProjectSlot, type SpanHandler, type StalenessLoopOptions, addProject, buildApi, buildOtelReceiver, checkCompatibility, compatPairs, computeGraphDiff, confidenceForEdge, extractFromDirectory, getBlastRadius, getGraph, getProject, getRootCause, handleSpan, listProjects, loadGraphFromDisk, loadSnapshotForDiff, logSpanHandler, makeSpanHandler, markStaleEdges, normalizeProjectPath, parseOtlpRequest, readErrorEvents, readRegistry, readStaleEvents, registryLockPath, registryPath, removeProject, resetGraph, routeSpanToProject, saveGraphToDisk, setStatus, startDaemon, startOtelGrpcReceiver, startPersistLoop, startStalenessLoop, stitchTrace, thresholdForEdgeType, touchLastSeen, writeAtomically };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MultiDirectedGraph } from 'graphology';
|
|
2
|
-
import { GraphNode, GraphEdge, ErrorEvent, BlastRadiusResult, RootCauseResult, RegistryEntry, RegistryStatus, RegistryFile } from '@neat.is/types';
|
|
2
|
+
import { GraphNode, GraphEdge, StaleEvent, ErrorEvent, BlastRadiusResult, RootCauseResult, RegistryEntry, RegistryStatus, RegistryFile } from '@neat.is/types';
|
|
3
|
+
export { StaleEvent } from '@neat.is/types';
|
|
3
4
|
import { FastifyInstance } from 'fastify';
|
|
4
5
|
|
|
5
6
|
type NeatGraph = MultiDirectedGraph<GraphNode, GraphEdge>;
|
|
@@ -195,16 +196,7 @@ declare function stitchTrace(graph: NeatGraph, sourceServiceId: string, ts: stri
|
|
|
195
196
|
declare function handleSpan(ctx: IngestContext, span: ParsedSpan): Promise<void>;
|
|
196
197
|
|
|
197
198
|
declare function makeSpanHandler(ctx: IngestContext): (span: ParsedSpan) => Promise<void>;
|
|
198
|
-
|
|
199
|
-
edgeId: string;
|
|
200
|
-
source: string;
|
|
201
|
-
target: string;
|
|
202
|
-
edgeType: string;
|
|
203
|
-
thresholdMs: number;
|
|
204
|
-
ageMs: number;
|
|
205
|
-
lastObserved: string;
|
|
206
|
-
transitionedAt: string;
|
|
207
|
-
}
|
|
199
|
+
|
|
208
200
|
interface MarkStaleOptions {
|
|
209
201
|
thresholds?: Record<string, number>;
|
|
210
202
|
now?: number;
|
|
@@ -309,11 +301,16 @@ declare function computeGraphDiff(liveGraph: NeatGraph, baseSnapshot: PersistedS
|
|
|
309
301
|
|
|
310
302
|
interface DaemonOptions {
|
|
311
303
|
neatHome?: string;
|
|
304
|
+
restPort?: number;
|
|
305
|
+
otlpPort?: number;
|
|
306
|
+
host?: string;
|
|
307
|
+
bindListeners?: boolean;
|
|
312
308
|
}
|
|
313
309
|
interface ProjectSlot {
|
|
314
310
|
entry: RegistryEntry;
|
|
315
311
|
graph: NeatGraph;
|
|
316
312
|
outPath: string;
|
|
313
|
+
paths: ProjectPaths;
|
|
317
314
|
stopPersist: () => void;
|
|
318
315
|
status: 'active' | 'broken';
|
|
319
316
|
errorReason?: string;
|
|
@@ -323,6 +320,8 @@ interface DaemonHandle {
|
|
|
323
320
|
reload: () => Promise<void>;
|
|
324
321
|
stop: () => Promise<void>;
|
|
325
322
|
pidPath: string;
|
|
323
|
+
restAddress: string;
|
|
324
|
+
otlpAddress: string;
|
|
326
325
|
}
|
|
327
326
|
/**
|
|
328
327
|
* Resolve which project's graph an OTel span belongs to. Looks up the
|
|
@@ -409,4 +408,4 @@ declare function touchLastSeen(name: string, at?: string): Promise<void>;
|
|
|
409
408
|
*/
|
|
410
409
|
declare function removeProject(name: string): Promise<RegistryEntry | undefined>;
|
|
411
410
|
|
|
412
|
-
export { type BuildApiOptions, type BuildOtelGrpcReceiverOptions, type BuildOtelReceiverOptions, type CompatPair, type CompatibilityResult, type DaemonHandle, type DaemonOptions, type ExtractResult, type GraphDiff, type IngestContext, type MarkStaleOptions, type NeatGraph, type OtelGrpcReceiver, type OtlpTracesRequest, type ParsedSpan, type PersistedSnapshot, ProjectNameCollisionError, type ProjectSlot, type SpanHandler, type
|
|
411
|
+
export { type BuildApiOptions, type BuildOtelGrpcReceiverOptions, type BuildOtelReceiverOptions, type CompatPair, type CompatibilityResult, type DaemonHandle, type DaemonOptions, type ExtractResult, type GraphDiff, type IngestContext, type MarkStaleOptions, type NeatGraph, type OtelGrpcReceiver, type OtlpTracesRequest, type ParsedSpan, type PersistedSnapshot, ProjectNameCollisionError, type ProjectSlot, type SpanHandler, type StalenessLoopOptions, addProject, buildApi, buildOtelReceiver, checkCompatibility, compatPairs, computeGraphDiff, confidenceForEdge, extractFromDirectory, getBlastRadius, getGraph, getProject, getRootCause, handleSpan, listProjects, loadGraphFromDisk, loadSnapshotForDiff, logSpanHandler, makeSpanHandler, markStaleEdges, normalizeProjectPath, parseOtlpRequest, readErrorEvents, readRegistry, readStaleEvents, registryLockPath, registryPath, removeProject, resetGraph, routeSpanToProject, saveGraphToDisk, setStatus, startDaemon, startOtelGrpcReceiver, startPersistLoop, startStalenessLoop, stitchTrace, thresholdForEdgeType, touchLastSeen, writeAtomically };
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
routeSpanToProject,
|
|
3
3
|
startDaemon
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
buildApi,
|
|
7
|
-
computeGraphDiff,
|
|
8
|
-
loadSnapshotForDiff
|
|
9
|
-
} from "./chunk-W7ZYJZC7.js";
|
|
4
|
+
} from "./chunk-66Z5IEFY.js";
|
|
10
5
|
import {
|
|
11
6
|
ProjectNameCollisionError,
|
|
12
7
|
addProject,
|
|
8
|
+
buildApi,
|
|
13
9
|
checkCompatibility,
|
|
14
10
|
compatPairs,
|
|
11
|
+
computeGraphDiff,
|
|
15
12
|
confidenceForEdge,
|
|
16
13
|
extractFromDirectory,
|
|
17
14
|
getBlastRadius,
|
|
@@ -21,6 +18,7 @@ import {
|
|
|
21
18
|
handleSpan,
|
|
22
19
|
listProjects,
|
|
23
20
|
loadGraphFromDisk,
|
|
21
|
+
loadSnapshotForDiff,
|
|
24
22
|
makeSpanHandler,
|
|
25
23
|
markStaleEdges,
|
|
26
24
|
normalizeProjectPath,
|
|
@@ -39,14 +37,15 @@ import {
|
|
|
39
37
|
thresholdForEdgeType,
|
|
40
38
|
touchLastSeen,
|
|
41
39
|
writeAtomically
|
|
42
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-FIXKIYNF.js";
|
|
41
|
+
import {
|
|
42
|
+
startOtelGrpcReceiver
|
|
43
|
+
} from "./chunk-G3PDTGOW.js";
|
|
43
44
|
import {
|
|
44
45
|
buildOtelReceiver,
|
|
45
46
|
logSpanHandler,
|
|
46
|
-
parseOtlpRequest
|
|
47
|
-
|
|
48
|
-
} from "./chunk-QYUB3FQL.js";
|
|
49
|
-
import "./chunk-DGUM43GV.js";
|
|
47
|
+
parseOtlpRequest
|
|
48
|
+
} from "./chunk-4ASCXBZF.js";
|
|
50
49
|
export {
|
|
51
50
|
ProjectNameCollisionError,
|
|
52
51
|
addProject,
|