@glasstrace/sdk 1.15.1 → 1.16.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/README.md +74 -8
- package/dist/async-context/index.cjs +21 -2
- package/dist/async-context/index.cjs.map +1 -1
- package/dist/async-context/index.js +2 -2
- package/dist/{capture-error-03qDnC5v.d.cts → capture-error-B0txjNut.d.cts} +2 -2
- package/dist/{capture-error-CAfFUyIU.d.ts → capture-error-Dc01rYNR.d.ts} +2 -2
- package/dist/{chunk-F7A3QXCT.js → chunk-774XIOZG.js} +2 -2
- package/dist/{chunk-VMK2G6QR.js → chunk-AFTCLH77.js} +2 -2
- package/dist/{chunk-XMD5OYD6.js → chunk-BGJKEFBN.js} +2 -2
- package/dist/{chunk-LQZRGBN5.js → chunk-DW3CZDS6.js} +2 -2
- package/dist/{chunk-T4ETJJSK.js → chunk-EWW3TZ52.js} +95 -11
- package/dist/{chunk-T4ETJJSK.js.map → chunk-EWW3TZ52.js.map} +1 -1
- package/dist/{chunk-7LE2O4ZJ.js → chunk-GBVMPMVV.js} +54 -5
- package/dist/{chunk-7LE2O4ZJ.js.map → chunk-GBVMPMVV.js.map} +1 -1
- package/dist/{chunk-HMEHYSTS.js → chunk-KM4UNN3Q.js} +2 -2
- package/dist/{chunk-MP3QNDXQ.js → chunk-OHSX224U.js} +2 -2
- package/dist/{chunk-6ST4QV7T.js → chunk-T7B752NF.js} +3 -3
- package/dist/{chunk-ZIYT2Y4B.js → chunk-WOYJAG7H.js} +3 -3
- package/dist/cli/init.cjs +18 -5
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +7 -7
- package/dist/cli/mcp-add.cjs +15 -2
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +3 -3
- package/dist/cli/uninit.js +3 -3
- package/dist/cli/upgrade-instructions.cjs +1 -1
- package/dist/cli/upgrade-instructions.js +3 -3
- package/dist/cli/validate.cjs +14 -1
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/{correlation-id-YcfcqOru.d.ts → correlation-id-B9YYmoZw.d.ts} +1 -1
- package/dist/{correlation-id-CZ2bstzA.d.cts → correlation-id-CelUvw7j.d.cts} +1 -1
- package/dist/edge-entry.cjs +21 -2
- package/dist/edge-entry.cjs.map +1 -1
- package/dist/edge-entry.d.cts +2 -2
- package/dist/edge-entry.d.ts +2 -2
- package/dist/edge-entry.js +4 -4
- package/dist/import-graph-DBLGNjcI.d.cts +238 -0
- package/dist/import-graph-Dka_Fm7j.d.ts +238 -0
- package/dist/index.cjs +137 -11
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-BQIJ5Dvc.d.cts → index.d-3-cJoY8y.d.cts} +10 -2
- package/dist/{index.d-BQIJ5Dvc.d.ts → index.d-3-cJoY8y.d.ts} +10 -2
- package/dist/index.d.cts +28 -4
- package/dist/index.d.ts +28 -4
- package/dist/index.js +5 -5
- package/dist/middleware/index.cjs +21 -2
- package/dist/middleware/index.cjs.map +1 -1
- package/dist/middleware/index.js +2 -2
- package/dist/node-entry.cjs +28 -8
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +4 -4
- package/dist/node-entry.d.ts +4 -4
- package/dist/node-entry.js +7 -7
- package/dist/node-subpath.cjs +27 -1
- package/dist/node-subpath.cjs.map +1 -1
- package/dist/node-subpath.d.cts +51 -235
- package/dist/node-subpath.d.ts +51 -235
- package/dist/node-subpath.js +16 -3
- package/dist/node-subpath.js.map +1 -1
- package/dist/{source-map-uploader-NUONOEJG.js → source-map-uploader-UJPZCUFN.js} +3 -3
- package/dist/trpc/index.cjs +21 -2
- package/dist/trpc/index.cjs.map +1 -1
- package/dist/trpc/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-F7A3QXCT.js.map → chunk-774XIOZG.js.map} +0 -0
- /package/dist/{chunk-VMK2G6QR.js.map → chunk-AFTCLH77.js.map} +0 -0
- /package/dist/{chunk-XMD5OYD6.js.map → chunk-BGJKEFBN.js.map} +0 -0
- /package/dist/{chunk-LQZRGBN5.js.map → chunk-DW3CZDS6.js.map} +0 -0
- /package/dist/{chunk-HMEHYSTS.js.map → chunk-KM4UNN3Q.js.map} +0 -0
- /package/dist/{chunk-MP3QNDXQ.js.map → chunk-OHSX224U.js.map} +0 -0
- /package/dist/{chunk-6ST4QV7T.js.map → chunk-T7B752NF.js.map} +0 -0
- /package/dist/{chunk-ZIYT2Y4B.js.map → chunk-WOYJAG7H.js.map} +0 -0
- /package/dist/{source-map-uploader-NUONOEJG.js.map → source-map-uploader-UJPZCUFN.js.map} +0 -0
|
@@ -43,6 +43,10 @@ declare const CaptureConfigSchema: z.ZodObject<{
|
|
|
43
43
|
consoleErrors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
44
44
|
errorResponseBodies: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
45
45
|
sideEffectEvidence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
46
|
+
captureFidelity: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
strict: "strict";
|
|
48
|
+
full: "full";
|
|
49
|
+
}>>>;
|
|
46
50
|
}, z.core.$strip>;
|
|
47
51
|
type CaptureConfig = z.infer<typeof CaptureConfigSchema>;
|
|
48
52
|
/** Developer-facing config for registerGlasstrace(). */
|
|
@@ -112,6 +116,10 @@ declare const SdkInitResponseSchema: z.ZodObject<{
|
|
|
112
116
|
consoleErrors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
113
117
|
errorResponseBodies: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
114
118
|
sideEffectEvidence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
119
|
+
captureFidelity: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
120
|
+
strict: "strict";
|
|
121
|
+
full: "full";
|
|
122
|
+
}>>>;
|
|
115
123
|
}, z.core.$strip>;
|
|
116
124
|
subscriptionStatus: z.ZodString;
|
|
117
125
|
linkedAccountId: z.ZodOptional<z.ZodString>;
|
|
@@ -284,7 +292,7 @@ type SideEffectSemanticFieldKey = SideEffectSemanticFieldStableCoreKey | string;
|
|
|
284
292
|
* wire. The set is fixed by SCHEMA-036; new reasons require a
|
|
285
293
|
* coordinated cross-repo bump.
|
|
286
294
|
*/
|
|
287
|
-
declare const SIDE_EFFECT_OMISSION_REASONS: readonly ["pii", "secret", "raw_payload", "unsupported_key", "value_too_long", "not_emitted", "capture_disabled"];
|
|
295
|
+
declare const SIDE_EFFECT_OMISSION_REASONS: readonly ["pii", "secret", "raw_payload", "unsupported_key", "value_too_long", "not_emitted", "capture_disabled", "raw_timestamp", "unhashed_id", "non_finite"];
|
|
288
296
|
/**
|
|
289
297
|
* One of the allowlisted side-effect omission reasons.
|
|
290
298
|
*
|
|
@@ -316,4 +324,4 @@ declare const SIDE_EFFECT_OPERATION_PHASES: readonly ["request", "post_response"
|
|
|
316
324
|
*/
|
|
317
325
|
type SideEffectOperationPhase = (typeof SIDE_EFFECT_OPERATION_PHASES)[number];
|
|
318
326
|
|
|
319
|
-
export { type AnonApiKey as A, type CaptureConfig as C, type GlasstraceEnvVars as G, type ImportGraphPayload as I, type SideEffectOperationKind as S, type SideEffectOperationStatus as a, type SideEffectOperationPhase as b, type SideEffectSemanticFieldKey as c, deriveSessionId as d, type SideEffectOmissionReason as e, type SideEffectSemanticFieldStableCoreKey as f, type
|
|
327
|
+
export { type AnonApiKey as A, type CaptureConfig as C, type GlasstraceEnvVars as G, type ImportGraphPayload as I, type SideEffectOperationKind as S, type SideEffectOperationStatus as a, type SideEffectOperationPhase as b, type SideEffectSemanticFieldKey as c, deriveSessionId as d, type SideEffectOmissionReason as e, type SideEffectSemanticFieldStableCoreKey as f, type SourceMapUploadResponse as g, type SourceMapManifestResponse as h, isSideEffectSemanticFieldKey as i, type SdkDiagnosticCode as j, type SessionId as k, type GlasstraceOptions as l, type SdkInitResponse as m, type SdkHealthReport as n };
|
|
@@ -43,6 +43,10 @@ declare const CaptureConfigSchema: z.ZodObject<{
|
|
|
43
43
|
consoleErrors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
44
44
|
errorResponseBodies: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
45
45
|
sideEffectEvidence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
46
|
+
captureFidelity: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
strict: "strict";
|
|
48
|
+
full: "full";
|
|
49
|
+
}>>>;
|
|
46
50
|
}, z.core.$strip>;
|
|
47
51
|
type CaptureConfig = z.infer<typeof CaptureConfigSchema>;
|
|
48
52
|
/** Developer-facing config for registerGlasstrace(). */
|
|
@@ -112,6 +116,10 @@ declare const SdkInitResponseSchema: z.ZodObject<{
|
|
|
112
116
|
consoleErrors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
113
117
|
errorResponseBodies: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
114
118
|
sideEffectEvidence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
119
|
+
captureFidelity: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
120
|
+
strict: "strict";
|
|
121
|
+
full: "full";
|
|
122
|
+
}>>>;
|
|
115
123
|
}, z.core.$strip>;
|
|
116
124
|
subscriptionStatus: z.ZodString;
|
|
117
125
|
linkedAccountId: z.ZodOptional<z.ZodString>;
|
|
@@ -284,7 +292,7 @@ type SideEffectSemanticFieldKey = SideEffectSemanticFieldStableCoreKey | string;
|
|
|
284
292
|
* wire. The set is fixed by SCHEMA-036; new reasons require a
|
|
285
293
|
* coordinated cross-repo bump.
|
|
286
294
|
*/
|
|
287
|
-
declare const SIDE_EFFECT_OMISSION_REASONS: readonly ["pii", "secret", "raw_payload", "unsupported_key", "value_too_long", "not_emitted", "capture_disabled"];
|
|
295
|
+
declare const SIDE_EFFECT_OMISSION_REASONS: readonly ["pii", "secret", "raw_payload", "unsupported_key", "value_too_long", "not_emitted", "capture_disabled", "raw_timestamp", "unhashed_id", "non_finite"];
|
|
288
296
|
/**
|
|
289
297
|
* One of the allowlisted side-effect omission reasons.
|
|
290
298
|
*
|
|
@@ -316,4 +324,4 @@ declare const SIDE_EFFECT_OPERATION_PHASES: readonly ["request", "post_response"
|
|
|
316
324
|
*/
|
|
317
325
|
type SideEffectOperationPhase = (typeof SIDE_EFFECT_OPERATION_PHASES)[number];
|
|
318
326
|
|
|
319
|
-
export { type AnonApiKey as A, type CaptureConfig as C, type GlasstraceEnvVars as G, type ImportGraphPayload as I, type SideEffectOperationKind as S, type SideEffectOperationStatus as a, type SideEffectOperationPhase as b, type SideEffectSemanticFieldKey as c, deriveSessionId as d, type SideEffectOmissionReason as e, type SideEffectSemanticFieldStableCoreKey as f, type
|
|
327
|
+
export { type AnonApiKey as A, type CaptureConfig as C, type GlasstraceEnvVars as G, type ImportGraphPayload as I, type SideEffectOperationKind as S, type SideEffectOperationStatus as a, type SideEffectOperationPhase as b, type SideEffectSemanticFieldKey as c, deriveSessionId as d, type SideEffectOmissionReason as e, type SideEffectSemanticFieldStableCoreKey as f, type SourceMapUploadResponse as g, type SourceMapManifestResponse as h, isSideEffectSemanticFieldKey as i, type SdkDiagnosticCode as j, type SessionId as k, type GlasstraceOptions as l, type SdkInitResponse as m, type SdkHealthReport as n };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, a as SessionManager, c as captureCorrelationId, g as getDateString, b as getOrigin } from './correlation-id-
|
|
2
|
-
export { F as FetchTarget, G as GlasstraceExporter, a as GlasstraceExporterOptions, I as InitClaimResult, R as ResolvedConfig, c as captureError, b as classifyFetchTarget, d as createGlasstraceSpanProcessor, g as getActiveConfig, e as getDiscoveryHandler, f as getLinkedAccountId, h as getOrCreateAnonKey, i as getStatus, j as isAnonymousMode, k as isProductionDisabled, l as isReady, m as loadCachedConfig, p as performInit, r as readAnonKey, n as readEnvVars, o as registerGlasstrace, q as resolveConfig, s as saveCachedConfig, t as sendInitRequest, w as waitForReady, u as withGlasstraceConfig } from './capture-error-
|
|
3
|
-
import { S as SideEffectOperationKind, a as SideEffectOperationStatus, b as SideEffectOperationPhase, c as SideEffectSemanticFieldKey } from './index.d-
|
|
4
|
-
export { e as SideEffectOmissionReason, f as SideEffectSemanticFieldStableCoreKey, d as deriveSessionId, i as isSideEffectSemanticFieldKey } from './index.d-
|
|
1
|
+
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, a as SessionManager, c as captureCorrelationId, g as getDateString, b as getOrigin } from './correlation-id-CelUvw7j.cjs';
|
|
2
|
+
export { F as FetchTarget, G as GlasstraceExporter, a as GlasstraceExporterOptions, I as InitClaimResult, R as ResolvedConfig, c as captureError, b as classifyFetchTarget, d as createGlasstraceSpanProcessor, g as getActiveConfig, e as getDiscoveryHandler, f as getLinkedAccountId, h as getOrCreateAnonKey, i as getStatus, j as isAnonymousMode, k as isProductionDisabled, l as isReady, m as loadCachedConfig, p as performInit, r as readAnonKey, n as readEnvVars, o as registerGlasstrace, q as resolveConfig, s as saveCachedConfig, t as sendInitRequest, w as waitForReady, u as withGlasstraceConfig } from './capture-error-B0txjNut.cjs';
|
|
3
|
+
import { S as SideEffectOperationKind, a as SideEffectOperationStatus, b as SideEffectOperationPhase, c as SideEffectSemanticFieldKey } from './index.d-3-cJoY8y.cjs';
|
|
4
|
+
export { e as SideEffectOmissionReason, f as SideEffectSemanticFieldStableCoreKey, d as deriveSessionId, i as isSideEffectSemanticFieldKey } from './index.d-3-cJoY8y.cjs';
|
|
5
5
|
export { RequestMiddlewareFunction, TracedRequestMiddlewareOptions } from './middleware/index.cjs';
|
|
6
6
|
export { WithAsyncCausalityOptions } from './async-context/index.cjs';
|
|
7
7
|
import './export/ReadableSpan';
|
|
@@ -71,6 +71,25 @@ interface RecordSideEffectInput {
|
|
|
71
71
|
* omission counter.
|
|
72
72
|
*/
|
|
73
73
|
fields?: Partial<Record<SideEffectSemanticFieldKey, string>>;
|
|
74
|
+
/**
|
|
75
|
+
* Optional value-fidelity scalars emitted on the off-summary
|
|
76
|
+
* `glasstrace.side_effect.scalar.*` channel. Keys must be camelCase
|
|
77
|
+
* ending in `Ms` / `Amount` / `Bytes` / `Ratio` / `Id` / `Value` /
|
|
78
|
+
* `Flag` (`Count` routes to the categorical `fields` channel instead).
|
|
79
|
+
* Values are native `number` / `boolean` / `string`.
|
|
80
|
+
*
|
|
81
|
+
* Under the default `strict` capture posture the SDK rejects raw
|
|
82
|
+
* wall-clock timestamps (a `Date`, or a raw epoch on a `*Ms` key) and
|
|
83
|
+
* unhashed `*Id` values at emit time — send bounded deltas as numbers,
|
|
84
|
+
* and pre-hash identifiers with `hashId` (`@glasstrace/sdk/node`). At
|
|
85
|
+
* most
|
|
86
|
+
* {@link MAX_SIDE_EFFECT_SCALARS_PER_OPERATION} scalars are recorded
|
|
87
|
+
* per call; rejected values route to the matching omission counter and
|
|
88
|
+
* the raw value never reaches the wire. The same key may also appear
|
|
89
|
+
* in `fields` — the two channels are distinct (selected by attribute
|
|
90
|
+
* prefix), so a categorical and a scalar facet can share a name.
|
|
91
|
+
*/
|
|
92
|
+
scalars?: Record<string, unknown>;
|
|
74
93
|
}
|
|
75
94
|
/**
|
|
76
95
|
* Record allowlisted side-effect evidence on the current active OTel
|
|
@@ -114,6 +133,11 @@ interface RecordSideEffectInput {
|
|
|
114
133
|
* locale: "en-US",
|
|
115
134
|
* timezone: "Europe/Paris",
|
|
116
135
|
* },
|
|
136
|
+
* scalars: {
|
|
137
|
+
* // Bounded delta (not a wall-clock epoch) and a boolean flag.
|
|
138
|
+
* renderMs: 42,
|
|
139
|
+
* hadAttachmentFlag: false,
|
|
140
|
+
* },
|
|
117
141
|
* });
|
|
118
142
|
* ```
|
|
119
143
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, a as SessionManager, c as captureCorrelationId, g as getDateString, b as getOrigin } from './correlation-id-
|
|
2
|
-
export { F as FetchTarget, G as GlasstraceExporter, a as GlasstraceExporterOptions, I as InitClaimResult, R as ResolvedConfig, c as captureError, b as classifyFetchTarget, d as createGlasstraceSpanProcessor, g as getActiveConfig, e as getDiscoveryHandler, f as getLinkedAccountId, h as getOrCreateAnonKey, i as getStatus, j as isAnonymousMode, k as isProductionDisabled, l as isReady, m as loadCachedConfig, p as performInit, r as readAnonKey, n as readEnvVars, o as registerGlasstrace, q as resolveConfig, s as saveCachedConfig, t as sendInitRequest, w as waitForReady, u as withGlasstraceConfig } from './capture-error-
|
|
3
|
-
import { S as SideEffectOperationKind, a as SideEffectOperationStatus, b as SideEffectOperationPhase, c as SideEffectSemanticFieldKey } from './index.d-
|
|
4
|
-
export { e as SideEffectOmissionReason, f as SideEffectSemanticFieldStableCoreKey, d as deriveSessionId, i as isSideEffectSemanticFieldKey } from './index.d-
|
|
1
|
+
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, a as SessionManager, c as captureCorrelationId, g as getDateString, b as getOrigin } from './correlation-id-B9YYmoZw.js';
|
|
2
|
+
export { F as FetchTarget, G as GlasstraceExporter, a as GlasstraceExporterOptions, I as InitClaimResult, R as ResolvedConfig, c as captureError, b as classifyFetchTarget, d as createGlasstraceSpanProcessor, g as getActiveConfig, e as getDiscoveryHandler, f as getLinkedAccountId, h as getOrCreateAnonKey, i as getStatus, j as isAnonymousMode, k as isProductionDisabled, l as isReady, m as loadCachedConfig, p as performInit, r as readAnonKey, n as readEnvVars, o as registerGlasstrace, q as resolveConfig, s as saveCachedConfig, t as sendInitRequest, w as waitForReady, u as withGlasstraceConfig } from './capture-error-Dc01rYNR.js';
|
|
3
|
+
import { S as SideEffectOperationKind, a as SideEffectOperationStatus, b as SideEffectOperationPhase, c as SideEffectSemanticFieldKey } from './index.d-3-cJoY8y.js';
|
|
4
|
+
export { e as SideEffectOmissionReason, f as SideEffectSemanticFieldStableCoreKey, d as deriveSessionId, i as isSideEffectSemanticFieldKey } from './index.d-3-cJoY8y.js';
|
|
5
5
|
export { RequestMiddlewareFunction, TracedRequestMiddlewareOptions } from './middleware/index.js';
|
|
6
6
|
export { WithAsyncCausalityOptions } from './async-context/index.js';
|
|
7
7
|
import './export/ReadableSpan';
|
|
@@ -71,6 +71,25 @@ interface RecordSideEffectInput {
|
|
|
71
71
|
* omission counter.
|
|
72
72
|
*/
|
|
73
73
|
fields?: Partial<Record<SideEffectSemanticFieldKey, string>>;
|
|
74
|
+
/**
|
|
75
|
+
* Optional value-fidelity scalars emitted on the off-summary
|
|
76
|
+
* `glasstrace.side_effect.scalar.*` channel. Keys must be camelCase
|
|
77
|
+
* ending in `Ms` / `Amount` / `Bytes` / `Ratio` / `Id` / `Value` /
|
|
78
|
+
* `Flag` (`Count` routes to the categorical `fields` channel instead).
|
|
79
|
+
* Values are native `number` / `boolean` / `string`.
|
|
80
|
+
*
|
|
81
|
+
* Under the default `strict` capture posture the SDK rejects raw
|
|
82
|
+
* wall-clock timestamps (a `Date`, or a raw epoch on a `*Ms` key) and
|
|
83
|
+
* unhashed `*Id` values at emit time — send bounded deltas as numbers,
|
|
84
|
+
* and pre-hash identifiers with `hashId` (`@glasstrace/sdk/node`). At
|
|
85
|
+
* most
|
|
86
|
+
* {@link MAX_SIDE_EFFECT_SCALARS_PER_OPERATION} scalars are recorded
|
|
87
|
+
* per call; rejected values route to the matching omission counter and
|
|
88
|
+
* the raw value never reaches the wire. The same key may also appear
|
|
89
|
+
* in `fields` — the two channels are distinct (selected by attribute
|
|
90
|
+
* prefix), so a categorical and a scalar facet can share a name.
|
|
91
|
+
*/
|
|
92
|
+
scalars?: Record<string, unknown>;
|
|
74
93
|
}
|
|
75
94
|
/**
|
|
76
95
|
* Record allowlisted side-effect evidence on the current active OTel
|
|
@@ -114,6 +133,11 @@ interface RecordSideEffectInput {
|
|
|
114
133
|
* locale: "en-US",
|
|
115
134
|
* timezone: "Europe/Paris",
|
|
116
135
|
* },
|
|
136
|
+
* scalars: {
|
|
137
|
+
* // Bounded delta (not a wall-clock epoch) and a boolean flag.
|
|
138
|
+
* renderMs: 42,
|
|
139
|
+
* hadAttachmentFlag: false,
|
|
140
|
+
* },
|
|
117
141
|
* });
|
|
118
142
|
* ```
|
|
119
143
|
*/
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
recordSideEffect,
|
|
11
11
|
registerGlasstrace,
|
|
12
12
|
withGlasstraceConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EWW3TZ52.js";
|
|
14
14
|
import {
|
|
15
15
|
getStatus,
|
|
16
16
|
isReady,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
GlasstraceSpanProcessor,
|
|
21
21
|
SdkError,
|
|
22
22
|
captureCorrelationId
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KM4UNN3Q.js";
|
|
24
24
|
import "./chunk-CL3OVHPO.js";
|
|
25
25
|
import "./chunk-DQ25VOKK.js";
|
|
26
26
|
import "./chunk-YG3X7TUI.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
performInit,
|
|
32
32
|
saveCachedConfig,
|
|
33
33
|
sendInitRequest
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-T7B752NF.js";
|
|
35
35
|
import {
|
|
36
36
|
isAnonymousMode,
|
|
37
37
|
isProductionDisabled,
|
|
@@ -41,11 +41,11 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
getOrCreateAnonKey,
|
|
43
43
|
readAnonKey
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-774XIOZG.js";
|
|
45
45
|
import {
|
|
46
46
|
deriveSessionId,
|
|
47
47
|
isSideEffectSemanticFieldKey
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-GBVMPMVV.js";
|
|
49
49
|
import "./chunk-YIEXKQYP.js";
|
|
50
50
|
import "./chunk-NSBPE2FW.js";
|
|
51
51
|
export {
|
|
@@ -15294,7 +15294,20 @@ var CaptureConfigSchema = external_exports.object({
|
|
|
15294
15294
|
* client-side allowlist enforcement layered with the product's
|
|
15295
15295
|
* storage-time filter as defense-in-depth.
|
|
15296
15296
|
*/
|
|
15297
|
-
sideEffectEvidence: external_exports.boolean().optional().default(false)
|
|
15297
|
+
sideEffectEvidence: external_exports.boolean().optional().default(false),
|
|
15298
|
+
/**
|
|
15299
|
+
* Per-account value-fidelity capture posture (server-pushed).
|
|
15300
|
+
*
|
|
15301
|
+
* `strict` (default) is fail-closed: the SDK rejects raw wall-clock
|
|
15302
|
+
* timestamps and unhashed identifiers from the `scalar.*` channel at
|
|
15303
|
+
* emit time. `full` relaxes those rejections so raw magnitudes can be
|
|
15304
|
+
* surfaced — but only in conjunction with an explicit producer opt-in
|
|
15305
|
+
* (so a `full`-configured account still emits strict-shaped scalars
|
|
15306
|
+
* unless the producer also opts in). The operator owns this flag; it
|
|
15307
|
+
* is never derived from producer or request input. Absent on the wire
|
|
15308
|
+
* ⇒ `strict`.
|
|
15309
|
+
*/
|
|
15310
|
+
captureFidelity: external_exports.enum(["strict", "full"]).optional().default("strict")
|
|
15298
15311
|
});
|
|
15299
15312
|
var SdkCachedConfigSchema = external_exports.object({
|
|
15300
15313
|
response: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
@@ -15485,7 +15498,13 @@ var GLASSTRACE_ATTRIBUTE_NAMES = {
|
|
|
15485
15498
|
SIDE_EFFECT_OMITTED_UNSUPPORTED_KEY: "glasstrace.side_effect.omitted.unsupported_key",
|
|
15486
15499
|
SIDE_EFFECT_OMITTED_VALUE_TOO_LONG: "glasstrace.side_effect.omitted.value_too_long",
|
|
15487
15500
|
SIDE_EFFECT_OMITTED_NOT_EMITTED: "glasstrace.side_effect.omitted.not_emitted",
|
|
15488
|
-
SIDE_EFFECT_OMITTED_CAPTURE_DISABLED: "glasstrace.side_effect.omitted.capture_disabled"
|
|
15501
|
+
SIDE_EFFECT_OMITTED_CAPTURE_DISABLED: "glasstrace.side_effect.omitted.capture_disabled",
|
|
15502
|
+
// Value-fidelity scalar-channel omission reasons. Counts only; the
|
|
15503
|
+
// rejected raw value (timestamp, unhashed id, non-finite number) is
|
|
15504
|
+
// never echoed. Mirror the product omission enum verbatim.
|
|
15505
|
+
SIDE_EFFECT_OMITTED_RAW_TIMESTAMP: "glasstrace.side_effect.omitted.raw_timestamp",
|
|
15506
|
+
SIDE_EFFECT_OMITTED_UNHASHED_ID: "glasstrace.side_effect.omitted.unhashed_id",
|
|
15507
|
+
SIDE_EFFECT_OMITTED_NON_FINITE: "glasstrace.side_effect.omitted.non_finite"
|
|
15489
15508
|
};
|
|
15490
15509
|
var MAX_SOURCE_MAP_FILE_PATH_LENGTH = 512;
|
|
15491
15510
|
var MAX_SOURCE_MAP_FILE_SIZE = 50 * 1024 * 1024;
|