@jaak.ai/stamps 2.2.0-dev.6 → 2.2.0-dev.9

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.
@@ -22,7 +22,6 @@ export declare class TracingService implements ITracingService {
22
22
  private readonly customerId?;
23
23
  private readonly tenantId?;
24
24
  private readonly environment?;
25
- private readonly propagateTraceHeaderCorsUrls;
26
25
  private readonly enableAutoInstrumentation;
27
26
  private spanProcessor;
28
27
  private parser;
@@ -55,6 +54,12 @@ export declare class TracingService implements ITracingService {
55
54
  recordException(span: Span, error: Error): void;
56
55
  setSpanAttribute(span: Span, key: string, value: any): void;
57
56
  trace<T>(name: string, fn: () => T | Promise<T>, attributes?: Record<string, any>): Promise<T>;
57
+ traceAsync<T>(name: string, fn: () => Promise<T>, attributes?: Record<string, any>): Promise<T>;
58
+ /**
59
+ * Flush all pending spans to the collector
60
+ * Call this when capture/process is complete to send all traces
61
+ */
62
+ flush(): Promise<void>;
58
63
  cleanup(): Promise<void>;
59
64
  /**
60
65
  * Get the current trace ID (useful for logging correlation)
@@ -43,6 +43,11 @@ export interface ITracingService {
43
43
  * @param attributes - Optional attributes
44
44
  */
45
45
  trace<T>(name: string, fn: () => T | Promise<T>, attributes?: Record<string, any>): Promise<T>;
46
+ /**
47
+ * Flushes all pending spans to the collector
48
+ * Call this when capture/process is complete
49
+ */
50
+ flush(): Promise<void>;
46
51
  /**
47
52
  * Cleans up resources
48
53
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaak.ai/stamps",
3
- "version": "2.2.0-dev.6",
3
+ "version": "2.2.0-dev.9",
4
4
  "description": "Jaak Document Identifier",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",