@rasputin-ai/core 0.1.4 → 0.3.0
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/announce-deploy/announce-deploy.d.ts +2 -2
- package/dist/announce-deploy/announce-deploy.d.ts.map +1 -1
- package/dist/create-client/create-client-types.d.ts +47 -31
- package/dist/create-client/create-client-types.d.ts.map +1 -1
- package/dist/create-client/create-client.d.ts +1 -1
- package/dist/create-client/create-client.d.ts.map +1 -1
- package/dist/create-client/is-client-enabled.d.ts.map +1 -1
- package/dist/create-client/resolve-endpoint-urls.d.ts +1 -0
- package/dist/create-client/resolve-endpoint-urls.d.ts.map +1 -1
- package/dist/create-ingest-event/create-ingest-event-types.d.ts +6 -2
- package/dist/create-ingest-event/create-ingest-event-types.d.ts.map +1 -1
- package/dist/create-ingest-event/create-ingest-event.d.ts.map +1 -1
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts +87 -0
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts.map +1 -0
- package/dist/create-ingest-event/truncate-ingest-message.d.ts +3 -0
- package/dist/create-ingest-event/truncate-ingest-message.d.ts.map +1 -0
- package/dist/detect-release/detect-release.d.ts +6 -3
- package/dist/detect-release/detect-release.d.ts.map +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +503 -95
- package/dist/instrumentation-manifest/instrumentation-manifest-types.d.ts +75 -0
- package/dist/instrumentation-manifest/instrumentation-manifest-types.d.ts.map +1 -0
- package/dist/instrumentation-manifest/upload-instrumentation-manifest.d.ts +16 -0
- package/dist/instrumentation-manifest/upload-instrumentation-manifest.d.ts.map +1 -0
- package/dist/normalize-frames/normalize-frames.d.ts +3 -3
- package/dist/normalize-frames/normalize-frames.d.ts.map +1 -1
- package/dist/repo-root/repo-root-from.d.ts +8 -0
- package/dist/repo-root/repo-root-from.d.ts.map +1 -0
- package/dist/repo-root/resolve-repo-root.d.ts +6 -0
- package/dist/repo-root/resolve-repo-root.d.ts.map +1 -0
- package/dist/repo-root/warn-repo-root-setup.d.ts +5 -0
- package/dist/repo-root/warn-repo-root-setup.d.ts.map +1 -0
- package/dist/sdk-meta.d.ts +1 -1
- package/dist/suppression/compute-burst-key.d.ts +0 -4
- package/dist/suppression/compute-burst-key.d.ts.map +1 -1
- package/dist/suppression/create-suppression.d.ts +9 -2
- package/dist/suppression/create-suppression.d.ts.map +1 -1
- package/dist/suppression/identity-needs-message-template.d.ts +3 -1
- package/dist/suppression/identity-needs-message-template.d.ts.map +1 -1
- package/dist/suppression/parameterize-message.d.ts.map +1 -1
- package/dist/suppression/suppression-types.d.ts +2 -2
- package/dist/suppression/suppression-types.d.ts.map +1 -1
- package/dist/transport/create-transport.d.ts.map +1 -1
- package/dist/transport/send-batch.d.ts +1 -0
- package/dist/transport/send-batch.d.ts.map +1 -1
- package/dist/transport/transport-queue.d.ts +7 -0
- package/dist/transport/transport-queue.d.ts.map +1 -1
- package/dist/transport/transport-types.d.ts +17 -4
- package/dist/transport/transport-types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static per-release facts about instrumented source. Runtime events stay v1;
|
|
3
|
+
* this payload is uploaded separately and joined in the debugger.
|
|
4
|
+
*/
|
|
5
|
+
export declare const INSTRUMENTATION_MANIFEST_SCHEMA_VERSION = 1;
|
|
6
|
+
export type InstrumentationParamBinding = {
|
|
7
|
+
kind: 'identifier';
|
|
8
|
+
name: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'object';
|
|
11
|
+
properties: Array<{
|
|
12
|
+
key: string;
|
|
13
|
+
binding: InstrumentationParamBinding;
|
|
14
|
+
}>;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'array';
|
|
17
|
+
elements: Array<InstrumentationParamBinding | {
|
|
18
|
+
kind: 'omitted';
|
|
19
|
+
}>;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'rest';
|
|
22
|
+
binding: InstrumentationParamBinding;
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'omitted';
|
|
25
|
+
};
|
|
26
|
+
export type InstrumentationArgIdentifier = {
|
|
27
|
+
index: number;
|
|
28
|
+
kind: 'identifier';
|
|
29
|
+
name: string;
|
|
30
|
+
} | {
|
|
31
|
+
index: number;
|
|
32
|
+
kind: 'object';
|
|
33
|
+
properties: Array<{
|
|
34
|
+
key: string;
|
|
35
|
+
name: string;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
export type InstrumentationManifestFunction = {
|
|
39
|
+
functionId: string;
|
|
40
|
+
path: string;
|
|
41
|
+
name: string;
|
|
42
|
+
startLine: number;
|
|
43
|
+
startColumn: number;
|
|
44
|
+
endLine: number;
|
|
45
|
+
endColumn: number;
|
|
46
|
+
params: InstrumentationParamBinding[];
|
|
47
|
+
};
|
|
48
|
+
export type InstrumentationManifestCallSite = {
|
|
49
|
+
id: string;
|
|
50
|
+
callerFunctionId: string;
|
|
51
|
+
calleeName: string;
|
|
52
|
+
calleeText: string;
|
|
53
|
+
path: string;
|
|
54
|
+
line: number;
|
|
55
|
+
column: number;
|
|
56
|
+
endLine: number;
|
|
57
|
+
endColumn: number;
|
|
58
|
+
resultBinding: string | null;
|
|
59
|
+
argIdentifiers: InstrumentationArgIdentifier[];
|
|
60
|
+
};
|
|
61
|
+
export type InstrumentationManifestDestructure = {
|
|
62
|
+
callerFunctionId: string;
|
|
63
|
+
sourceParam: string;
|
|
64
|
+
path: string;
|
|
65
|
+
line: number;
|
|
66
|
+
column: number;
|
|
67
|
+
binding: InstrumentationParamBinding;
|
|
68
|
+
};
|
|
69
|
+
export type InstrumentationManifestContent = {
|
|
70
|
+
schema_version: typeof INSTRUMENTATION_MANIFEST_SCHEMA_VERSION;
|
|
71
|
+
functions: InstrumentationManifestFunction[];
|
|
72
|
+
callSites: InstrumentationManifestCallSite[];
|
|
73
|
+
destructures: InstrumentationManifestDestructure[];
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=instrumentation-manifest-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation-manifest-types.d.ts","sourceRoot":"","sources":["../../src/instrumentation-manifest/instrumentation-manifest-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,uCAAuC,IAAI,CAAC;AAEzD,MAAM,MAAM,2BAA2B,GACpC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACpC;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,2BAA2B,CAAA;KAAE,CAAC,CAAC;CACxE,GACD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,2BAA2B,GAAG;QAAE,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC,CAAA;CAAE,GACrF;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,2BAA2B,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEvB,MAAM,MAAM,4BAA4B,GACrC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAEvF,MAAM,MAAM,+BAA+B,GAAG;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,2BAA2B,EAAE,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,4BAA4B,EAAE,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAChD,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,2BAA2B,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC5C,cAAc,EAAE,OAAO,uCAAuC,CAAC;IAC/D,SAAS,EAAE,+BAA+B,EAAE,CAAC;IAC7C,SAAS,EAAE,+BAA+B,EAAE,CAAC;IAC7C,YAAY,EAAE,kCAAkC,EAAE,CAAC;CACnD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TransportFetch } from '../transport/transport-types';
|
|
2
|
+
import type { InstrumentationManifestContent } from './instrumentation-manifest-types';
|
|
3
|
+
type UploadInstrumentationManifestOptions = {
|
|
4
|
+
url: string;
|
|
5
|
+
projectApiKey: string;
|
|
6
|
+
release: string;
|
|
7
|
+
manifest: InstrumentationManifestContent;
|
|
8
|
+
fetch?: TransportFetch;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Fire-and-forget merge of static source metadata for this release.
|
|
12
|
+
* Never throws — init and capture must not wait on this HTTP call.
|
|
13
|
+
*/
|
|
14
|
+
export declare const uploadInstrumentationManifest: (options: UploadInstrumentationManifestOptions) => Promise<"ok" | "failed">;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=upload-instrumentation-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-instrumentation-manifest.d.ts","sourceRoot":"","sources":["../../src/instrumentation-manifest/upload-instrumentation-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAEvF,KAAK,oCAAoC,GAAG;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,8BAA8B,CAAC;IACzC,KAAK,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GACzC,SAAS,oCAAoC,KAC3C,OAAO,CAAC,IAAI,GAAG,QAAQ,CAoBzB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ResolvedFrame } from '../resolve-source-maps/resolved-frame';
|
|
2
2
|
type NormalizeFramesOptions = {
|
|
3
|
-
/**
|
|
4
|
-
appRoot
|
|
3
|
+
/** Git/monorepo root — stripped to produce repo-relative paths. */
|
|
4
|
+
appRoot: string;
|
|
5
5
|
};
|
|
6
6
|
export type Frame = {
|
|
7
7
|
generated: {
|
|
@@ -19,6 +19,6 @@ export type Frame = {
|
|
|
19
19
|
in_app: boolean;
|
|
20
20
|
};
|
|
21
21
|
/** Normalize resolved frames: repo-relative paths + in_app (runs after source-map resolution). */
|
|
22
|
-
export declare const normalizeFrames: (frames: ResolvedFrame[], options
|
|
22
|
+
export declare const normalizeFrames: (frames: ResolvedFrame[], options: NormalizeFramesOptions) => Frame[];
|
|
23
23
|
export {};
|
|
24
24
|
//# sourceMappingURL=normalize-frames.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-frames.d.ts","sourceRoot":"","sources":["../../src/normalize-frames/normalize-frames.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAE3E,KAAK,sBAAsB,GAAG;IAC7B,
|
|
1
|
+
{"version":3,"file":"normalize-frames.d.ts","sourceRoot":"","sources":["../../src/normalize-frames/normalize-frames.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAE3E,KAAK,sBAAsB,GAAG;IAC7B,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IACnB,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAgDF,kGAAkG;AAClG,eAAO,MAAM,eAAe,GAC3B,QAAQ,aAAa,EAAE,EACvB,SAAS,sBAAsB,KAC7B,KAAK,EA2BP,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the repository (or package) root from a caller module URL.
|
|
3
|
+
*
|
|
4
|
+
* Walks up from the module file looking for a `.git` directory first (monorepo root).
|
|
5
|
+
* Falls back to the topmost `package.json` found while walking up.
|
|
6
|
+
*/
|
|
7
|
+
export declare const repoRootFrom: (moduleUrl: string) => string;
|
|
8
|
+
//# sourceMappingURL=repo-root-from.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-root-from.d.ts","sourceRoot":"","sources":["../../src/repo-root/repo-root-from.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,KAAG,MAchD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-repo-root.d.ts","sourceRoot":"","sources":["../../src/repo-root/resolve-repo-root.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAC7E,eAAO,MAAM,eAAe,GAAI,SAAS;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,KAAG,MAAM,GAAG,SAMZ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Reset per-process warning state (for testing only). */
|
|
2
|
+
export declare const resetRepoRootSetupWarnings: () => void;
|
|
3
|
+
export declare const warnIfMissingRepoRoot: () => void;
|
|
4
|
+
export declare const warnIfSuspiciousRepoRoot: (root: string) => void;
|
|
5
|
+
//# sourceMappingURL=warn-repo-root-setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warn-repo-root-setup.d.ts","sourceRoot":"","sources":["../../src/repo-root/warn-repo-root-setup.ts"],"names":[],"mappings":"AASA,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B,YAGtC,CAAC;AAOF,eAAO,MAAM,qBAAqB,YAajC,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,SAcpD,CAAC"}
|
package/dist/sdk-meta.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import type { Frame } from '../normalize-frames/normalize-frames';
|
|
2
|
-
/**
|
|
3
|
-
* In-process burst bucket id — aligned with server fingerprint boundaries.
|
|
4
|
-
* For generic `Error`, includes the same parameterized message template the API uses.
|
|
5
|
-
*/
|
|
6
2
|
export declare const computeBurstKey: (errorType: string, message: string, code: string | null | undefined, frames: Frame[]) => string;
|
|
7
3
|
//# sourceMappingURL=compute-burst-key.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-burst-key.d.ts","sourceRoot":"","sources":["../../src/suppression/compute-burst-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"compute-burst-key.d.ts","sourceRoot":"","sources":["../../src/suppression/compute-burst-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AA4DlE,eAAO,MAAM,eAAe,GAC3B,WAAW,MAAM,EACjB,SAAS,MAAM,EACf,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,QAAQ,KAAK,EAAE,KACb,MAUF,CAAC"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import type { RawFrame } from '../parse-stack/raw-frame';
|
|
1
2
|
import type { CreateSuppressionOptions, IngestSummary, PrepareSummaryFrames, SuppressionDecideInput, SuppressionDecideResult } from './suppression-types';
|
|
2
3
|
/**
|
|
3
|
-
* Local burst suppression (network protection).
|
|
4
|
-
*
|
|
4
|
+
* Local burst suppression (network protection).
|
|
5
|
+
* ⚠️ FINGERPRINT IDENTITY LOCKSTEP — computeBurstKey must stay on the same
|
|
6
|
+
* recipe as server createFingerprintIdentity. Drain does not remap; transport
|
|
7
|
+
* resolves source maps at send so summary stack_frames match the exemplar.
|
|
5
8
|
*/
|
|
6
9
|
export declare const createSuppression: (options?: CreateSuppressionOptions) => {
|
|
7
10
|
decide: (input: SuppressionDecideInput) => SuppressionDecideResult;
|
|
11
|
+
drainSummaries: (now?: number) => {
|
|
12
|
+
summary: IngestSummary;
|
|
13
|
+
rawFrames: RawFrame[];
|
|
14
|
+
}[];
|
|
8
15
|
takeSummaries: (now?: number, prepareSummary?: PrepareSummaryFrames) => Promise<IngestSummary[]>;
|
|
9
16
|
/** Test helper — number of active burst buckets. */
|
|
10
17
|
size: () => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-suppression.d.ts","sourceRoot":"","sources":["../../src/suppression/create-suppression.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-suppression.d.ts","sourceRoot":"","sources":["../../src/suppression/create-suppression.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EACX,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EAEpB,sBAAsB,EACtB,uBAAuB,EACvB,MAAM,qBAAqB,CAAC;AAyC7B;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAS,wBAA6B;oBAmDhD,sBAAsB,KAAG,uBAAuB;sCAgEpE;QAAE,OAAO,EAAE,aAAa,CAAC;QAAC,SAAS,EAAE,QAAQ,EAAE,CAAA;KAAE,EAAE;mDAsBpC,oBAAoB,KACnC,OAAO,CAAC,aAAa,EAAE,CAAC;IA0B1B,oDAAoD;;CAGrD,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* ⚠️ FINGERPRINT IDENTITY LOCKSTEP — byte-identical to
|
|
3
|
+
* `packages/~core/lib/identity-needs-message-template.ts`.
|
|
3
4
|
* SDK copy — no ~core dependency at publish time.
|
|
5
|
+
* Changing one side splits burst buckets from server groups.
|
|
4
6
|
*/
|
|
5
7
|
export declare const identityNeedsMessageTemplate: (type: string, code: string | null | undefined) => boolean;
|
|
6
8
|
//# sourceMappingURL=identity-needs-message-template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-needs-message-template.d.ts","sourceRoot":"","sources":["../../src/suppression/identity-needs-message-template.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"identity-needs-message-template.d.ts","sourceRoot":"","sources":["../../src/suppression/identity-needs-message-template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,GACxC,MAAM,MAAM,EACZ,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,KAC7B,OAGF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameterize-message.d.ts","sourceRoot":"","sources":["../../src/suppression/parameterize-message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parameterize-message.d.ts","sourceRoot":"","sources":["../../src/suppression/parameterize-message.ts"],"names":[],"mappings":"AAsFA,eAAO,MAAM,mBAAmB,GAAI,YAAY,MAAM,KAAG,MAyBxD,CAAC"}
|
|
@@ -13,7 +13,7 @@ export type IngestSummary = {
|
|
|
13
13
|
environment: string;
|
|
14
14
|
origin: IngestOrigin;
|
|
15
15
|
resolution?: FrameResolution;
|
|
16
|
-
release
|
|
16
|
+
release: string;
|
|
17
17
|
};
|
|
18
18
|
export type SummaryIdentity = Pick<IngestSummary, 'type' | 'message' | 'stack_frames' | 'origin' | 'code' | 'resolution'>;
|
|
19
19
|
export type SuppressionDecideInput = {
|
|
@@ -25,7 +25,7 @@ export type SuppressionDecideInput = {
|
|
|
25
25
|
origin: IngestOrigin;
|
|
26
26
|
code?: string | null;
|
|
27
27
|
environment: string;
|
|
28
|
-
release
|
|
28
|
+
release: string;
|
|
29
29
|
route?: string | null;
|
|
30
30
|
/** Injectable clock for tests. */
|
|
31
31
|
now?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suppression-types.d.ts","sourceRoot":"","sources":["../../src/suppression/suppression-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,kFAAkF;AAClF,MAAM,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"suppression-types.d.ts","sourceRoot":"","sources":["../../src/suppression/suppression-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,kFAAkF;AAClF,MAAM,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,eAAe,CAAC;I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
+
{"version":3,"file":"create-transport.d.ts","sourceRoot":"","sources":["../../src/transport/create-transport.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAe,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAoCxF,eAAO,MAAM,eAAe,GAAI,SAAS,sBAAsB,KAAG,SA6KjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-batch.d.ts","sourceRoot":"","sources":["../../src/transport/send-batch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,KAAK,gBAAgB,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"send-batch.d.ts","sourceRoot":"","sources":["../../src/transport/send-batch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,KAAK,gBAAgB,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAkCF,iGAAiG;AACjG,eAAO,MAAM,SAAS,GACrB,SAAS,gBAAgB,KACvB,OAAO,CAAC,IAAI,GAAG,SAAS,GAAG,QAAQ,CAsErC,CAAC"}
|
|
@@ -4,6 +4,13 @@ export declare const createQueue: (maxSize: number) => {
|
|
|
4
4
|
enqueue: (item: QueuedEvent) => void;
|
|
5
5
|
drain: (count: number) => QueuedEvent[];
|
|
6
6
|
size: () => number;
|
|
7
|
+
getStats: () => {
|
|
8
|
+
queued: number;
|
|
9
|
+
enqueued: number;
|
|
10
|
+
droppedIncoming: number;
|
|
11
|
+
droppedQueued: number;
|
|
12
|
+
droppedTotal: number;
|
|
13
|
+
};
|
|
7
14
|
clear: () => void;
|
|
8
15
|
};
|
|
9
16
|
//# sourceMappingURL=transport-queue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-queue.d.ts","sourceRoot":"","sources":["../../src/transport/transport-queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,mBAAmB,CAAC;AAQxE,kEAAkE;AAClE,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM;
|
|
1
|
+
{"version":3,"file":"transport-queue.d.ts","sourceRoot":"","sources":["../../src/transport/transport-queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,mBAAmB,CAAC;AAQxE,kEAAkE;AAClE,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM;oBAkBnB,WAAW;mBAgBZ,MAAM,KAAG,WAAW,EAAE;;;;;;;;;;CAiB5C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IngestEvent } from '../create-ingest-event/create-ingest-event-types';
|
|
2
2
|
import type { RawFrame } from '../parse-stack/raw-frame';
|
|
3
|
-
import type { IngestSummary } from '../suppression/suppression-types';
|
|
3
|
+
import type { IngestSummary, PrepareSummaryFrames } from '../suppression/suppression-types';
|
|
4
4
|
/**
|
|
5
5
|
* Drop order when the queue is full: repeat exemplars first, then summaries,
|
|
6
6
|
* protect first-sighting last. Summaries carry tens of thousands of counts in
|
|
@@ -17,12 +17,21 @@ export type QueuedEvent = {
|
|
|
17
17
|
kind: 'summary';
|
|
18
18
|
summary: IngestSummary;
|
|
19
19
|
priority: 'summary';
|
|
20
|
+
/** Same capture-time frames as the exemplar — remapped at send. */
|
|
21
|
+
rawFrames: RawFrame[];
|
|
20
22
|
};
|
|
21
23
|
export type TransportFetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
22
|
-
|
|
24
|
+
type PrepareQueuedEvent = (item: {
|
|
23
25
|
event: IngestEvent;
|
|
24
26
|
rawFrames: RawFrame[];
|
|
25
27
|
}) => Promise<IngestEvent>;
|
|
28
|
+
export type TransportStats = {
|
|
29
|
+
queued: number;
|
|
30
|
+
enqueued: number;
|
|
31
|
+
droppedIncoming: number;
|
|
32
|
+
droppedQueued: number;
|
|
33
|
+
droppedTotal: number;
|
|
34
|
+
};
|
|
26
35
|
export type CreateTransportOptions = {
|
|
27
36
|
/** Real API ingest URL — `POST /ingest` (apps/api post-ingest.handler). */
|
|
28
37
|
ingestUrl: string;
|
|
@@ -39,15 +48,19 @@ export type CreateTransportOptions = {
|
|
|
39
48
|
installSignalHandlers?: boolean;
|
|
40
49
|
/** Rewrite events before send (e.g. source-map resolve + re-normalize). */
|
|
41
50
|
prepareEvent?: PrepareQueuedEvent;
|
|
51
|
+
/** Rewrite summary stacks with the same resolver as events. */
|
|
52
|
+
prepareSummary?: PrepareSummaryFrames;
|
|
42
53
|
sdkVersion?: string;
|
|
43
54
|
sdkName?: string;
|
|
44
55
|
};
|
|
45
56
|
export type Transport = {
|
|
46
57
|
enqueue: (event: IngestEvent, priority?: 'first' | 'repeat', rawFrames?: RawFrame[]) => void;
|
|
47
|
-
enqueueSummary: (summary: IngestSummary) => void;
|
|
58
|
+
enqueueSummary: (summary: IngestSummary, rawFrames?: RawFrame[]) => void;
|
|
48
59
|
flush: (timeoutMs?: number) => Promise<void>;
|
|
49
60
|
close: () => Promise<void>;
|
|
50
|
-
/**
|
|
61
|
+
/** Number of events waiting in the bounded queue or a failed batch awaiting replay. */
|
|
51
62
|
size: () => number;
|
|
63
|
+
getStats: () => TransportStats;
|
|
52
64
|
};
|
|
65
|
+
export {};
|
|
53
66
|
//# sourceMappingURL=transport-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-types.d.ts","sourceRoot":"","sources":["../../src/transport/transport-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"transport-types.d.ts","sourceRoot":"","sources":["../../src/transport/transport-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE5F;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE/D,MAAM,MAAM,WAAW,GACpB;IACA,IAAI,EAAE,OA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