@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.
@@ -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
  /**
@@ -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-CNEouInA.cjs");exports.captureWorkerPoolOperation=e.captureWorkerPoolOperation;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./workerPoolSpanCapture-DEwlTq0a.cjs");exports.captureWorkerPoolOperation=e.captureWorkerPoolOperation;
@@ -1,4 +1,4 @@
1
- import { c as e } from "./workerPoolSpanCapture-BOnYC4s3.js";
1
+ import { c as e } from "./workerPoolSpanCapture-D0-0Z0Jw.js";
2
2
  export {
3
3
  e as captureWorkerPoolOperation
4
4
  };