@sailfish-ai/sf-veritas 0.2.6 → 0.2.7
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/funcSpanTransformer-BLhIRZqX.js +765 -0
- package/dist/funcSpanTransformer-BpWuHXKT.cjs +1 -0
- package/dist/plugins/funcspanEsbuildPlugin.cjs +1 -1
- package/dist/plugins/funcspanEsbuildPlugin.mjs +1 -1
- package/dist/plugins/funcspanRollupPlugin.cjs +1 -1
- package/dist/plugins/funcspanRollupPlugin.mjs +1 -1
- package/dist/plugins/funcspanTscPlugin.cjs +1 -1
- package/dist/plugins/funcspanTscPlugin.mjs +1 -1
- package/dist/plugins/funcspanVitePlugin.cjs +1 -1
- package/dist/plugins/funcspanVitePlugin.mjs +1 -1
- package/dist/plugins/funcspanWebpackLoader.cjs +1 -1
- package/dist/plugins/funcspanWebpackLoader.mjs +1 -1
- package/dist/sf-veritas.cjs +15 -15
- package/dist/sf-veritas.mjs +367 -324
- package/dist/types/funcSpanConfig.d.ts +8 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/unifiedInterceptor.d.ts +4 -0
- package/dist/worker-pool-capture.cjs +1 -1
- package/dist/worker-pool-capture.mjs +1 -1
- package/dist/{workerPoolSpanCapture-BOnYC4s3.js → workerPoolSpanCapture-D0-0Z0Jw.js} +169 -156
- package/dist/workerPoolSpanCapture-DEwlTq0a.cjs +86 -0
- package/package.json +1 -1
- package/dist/funcSpanTransformer-TjdooSrw.cjs +0 -1
- package/dist/funcSpanTransformer-sqmZLAcs.js +0 -750
- package/dist/workerPoolSpanCapture-CNEouInA.cjs +0 -83
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* 6. Environment variables SF_FUNCSPAN_*
|
|
14
14
|
* 7. Hard-coded defaults
|
|
15
15
|
*/
|
|
16
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
16
17
|
export interface FuncspanConfig {
|
|
17
18
|
/** Capture function input arguments */
|
|
18
19
|
capture_arguments: boolean;
|
|
@@ -57,8 +58,14 @@ export declare function getDefaultConfig(): FuncspanConfig;
|
|
|
57
58
|
* Example: "1-1-10-10-1-1.0-1-0-0"
|
|
58
59
|
*/
|
|
59
60
|
export declare function parseHeaderOverride(header: string): FuncspanHeaderOverride | null;
|
|
61
|
+
/**
|
|
62
|
+
* AsyncLocalStorage for per-request funcspan override
|
|
63
|
+
* Exported to allow direct .run() usage in patchhttpInbound.ts
|
|
64
|
+
*/
|
|
65
|
+
export declare const funcspanOverrideStorage: AsyncLocalStorage<string>;
|
|
60
66
|
/**
|
|
61
67
|
* Set funcspan override from HTTP header (per-request)
|
|
68
|
+
* @deprecated Use funcspanOverrideStorage.run() directly instead for proper async context propagation
|
|
62
69
|
*/
|
|
63
70
|
export declare function setFuncspanOverride(headerValue: string): void;
|
|
64
71
|
/**
|
|
@@ -67,6 +74,7 @@ export declare function setFuncspanOverride(headerValue: string): void;
|
|
|
67
74
|
export declare function getFuncspanOverride(): string | undefined;
|
|
68
75
|
/**
|
|
69
76
|
* Clear funcspan override (usually at end of request)
|
|
77
|
+
* @deprecated No longer needed - context is automatically cleared when .run() callback completes
|
|
70
78
|
*/
|
|
71
79
|
export declare function clearFuncspanOverride(): void;
|
|
72
80
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ContextManager, runWithContext, getCurrentFunctionSpanId } from "./contextManager";
|
|
2
|
-
export { addOrUpdateMetadata, identify, setupInterceptors } from "./unifiedInterceptor";
|
|
2
|
+
export { addOrUpdateMetadata, identify, setupInterceptors, isSetupInterceptorsInitialized } from "./unifiedInterceptor";
|
|
3
3
|
export { captureFunctionSpan, type FunctionSpanMetadata } from "./funcSpanCapture";
|
|
4
4
|
export { type FuncspanConfig, type FuncspanHeaderOverride, setFuncspanOverride, getFuncspanOverride, clearFuncspanOverride, parseHeaderOverride, getEnvConfig, getDefaultConfig, } from "./funcSpanConfig";
|
|
5
5
|
export { initializeConfigLoader, getGlobalConfig, isConfigLoaderInitialized, } from "./funcSpanConfigLoader";
|
|
@@ -7,6 +7,10 @@ import { Traits } from "./utils";
|
|
|
7
7
|
* configuration variables, and sets up log, exception, and metadata interceptors.
|
|
8
8
|
*/
|
|
9
9
|
export declare function setupInterceptors(options: SetupOptions): void;
|
|
10
|
+
/**
|
|
11
|
+
* Check if setupInterceptors has been initialized
|
|
12
|
+
*/
|
|
13
|
+
export declare function isSetupInterceptorsInitialized(): boolean;
|
|
10
14
|
/**
|
|
11
15
|
* Identifies a user and optionally updates their metadata.
|
|
12
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./workerPoolSpanCapture-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./workerPoolSpanCapture-DEwlTq0a.cjs");exports.captureWorkerPoolOperation=e.captureWorkerPoolOperation;
|