@brizz/sdk 0.1.2-rc.1 → 0.1.3-rc.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/index.d.cts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { LogRecordExporter } from '@opentelemetry/sdk-logs';
2
2
  import { MetricReader } from '@opentelemetry/sdk-metrics';
3
3
  import { SpanExporter } from '@opentelemetry/sdk-trace-base';
4
- import { InstrumentationConfig, InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
5
4
  import { LogBody, SeverityNumber } from '@opentelemetry/api-logs';
6
5
  export { SeverityNumber } from '@opentelemetry/api-logs';
7
6
  import { SpanProcessor } from '@opentelemetry/sdk-trace-node';
@@ -27,44 +26,6 @@ interface IInstrumentModules {
27
26
  vercelAI?: unknown;
28
27
  }
29
28
 
30
- interface IVercelAIInstrumentationConfig extends InstrumentationConfig {
31
- captureMessageContent?: boolean;
32
- exceptionLogger?: (error: Error) => void;
33
- enableMetrics?: boolean;
34
- emitEvents?: boolean;
35
- }
36
- type VercelAIInstrumentationConfig = IVercelAIInstrumentationConfig;
37
-
38
- interface IVercelAIModule {
39
- generateText?: (...args: unknown[]) => unknown;
40
- streamText?: (...args: unknown[]) => unknown;
41
- generateObject?: (...args: unknown[]) => unknown;
42
- streamObject?: (...args: unknown[]) => unknown;
43
- embed?: (...args: unknown[]) => unknown;
44
- embedMany?: (...args: unknown[]) => unknown;
45
- generateImage?: (...args: unknown[]) => unknown;
46
- generateSpeech?: (...args: unknown[]) => unknown;
47
- transcribe?: (...args: unknown[]) => unknown;
48
- [key: string]: unknown;
49
- }
50
- declare class VercelAIInstrumentation extends InstrumentationBase<VercelAIInstrumentationConfig> {
51
- private _genaiClientOperationDuration;
52
- private _genaiClientTokenUsage;
53
- private _telemetryRecorder;
54
- private _streamHandler;
55
- private _patchers;
56
- private _vercelAiNamespace;
57
- private static readonly _WRAPPED_SYMBOL;
58
- constructor(config?: VercelAIInstrumentationConfig);
59
- setConfig(config?: VercelAIInstrumentationConfig): void;
60
- private _initializeComponents;
61
- protected init(): InstrumentationNodeModuleDefinition[];
62
- _updateMetricInstruments(): void;
63
- private _patchModuleExports;
64
- manuallyInstrument(module: unknown): IVercelAIModule;
65
- wrapFactoryReturn<T extends Record<string, any>>(instance: T): T;
66
- }
67
-
68
29
  declare enum LogLevel {
69
30
  NONE = 0,
70
31
  ERROR = 1,
@@ -169,10 +130,8 @@ interface RuntimeInfo {
169
130
  }
170
131
  declare function detectRuntime(): RuntimeInfo;
171
132
 
172
- declare function maybeRegisterESMLoader(): boolean;
173
-
174
133
  declare namespace init {
175
134
  export { };
176
135
  }
177
136
 
178
- export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMaskingConfig, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, VercelAIInstrumentation, WithSessionId, detectRuntime, emitEvent, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, maybeRegisterESMLoader, setLogLevel };
137
+ export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMaskingConfig, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, WithSessionId, detectRuntime, emitEvent, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, setLogLevel };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { LogRecordExporter } from '@opentelemetry/sdk-logs';
2
2
  import { MetricReader } from '@opentelemetry/sdk-metrics';
3
3
  import { SpanExporter } from '@opentelemetry/sdk-trace-base';
4
- import { InstrumentationConfig, InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
5
4
  import { LogBody, SeverityNumber } from '@opentelemetry/api-logs';
6
5
  export { SeverityNumber } from '@opentelemetry/api-logs';
7
6
  import { SpanProcessor } from '@opentelemetry/sdk-trace-node';
@@ -27,44 +26,6 @@ interface IInstrumentModules {
27
26
  vercelAI?: unknown;
28
27
  }
29
28
 
30
- interface IVercelAIInstrumentationConfig extends InstrumentationConfig {
31
- captureMessageContent?: boolean;
32
- exceptionLogger?: (error: Error) => void;
33
- enableMetrics?: boolean;
34
- emitEvents?: boolean;
35
- }
36
- type VercelAIInstrumentationConfig = IVercelAIInstrumentationConfig;
37
-
38
- interface IVercelAIModule {
39
- generateText?: (...args: unknown[]) => unknown;
40
- streamText?: (...args: unknown[]) => unknown;
41
- generateObject?: (...args: unknown[]) => unknown;
42
- streamObject?: (...args: unknown[]) => unknown;
43
- embed?: (...args: unknown[]) => unknown;
44
- embedMany?: (...args: unknown[]) => unknown;
45
- generateImage?: (...args: unknown[]) => unknown;
46
- generateSpeech?: (...args: unknown[]) => unknown;
47
- transcribe?: (...args: unknown[]) => unknown;
48
- [key: string]: unknown;
49
- }
50
- declare class VercelAIInstrumentation extends InstrumentationBase<VercelAIInstrumentationConfig> {
51
- private _genaiClientOperationDuration;
52
- private _genaiClientTokenUsage;
53
- private _telemetryRecorder;
54
- private _streamHandler;
55
- private _patchers;
56
- private _vercelAiNamespace;
57
- private static readonly _WRAPPED_SYMBOL;
58
- constructor(config?: VercelAIInstrumentationConfig);
59
- setConfig(config?: VercelAIInstrumentationConfig): void;
60
- private _initializeComponents;
61
- protected init(): InstrumentationNodeModuleDefinition[];
62
- _updateMetricInstruments(): void;
63
- private _patchModuleExports;
64
- manuallyInstrument(module: unknown): IVercelAIModule;
65
- wrapFactoryReturn<T extends Record<string, any>>(instance: T): T;
66
- }
67
-
68
29
  declare enum LogLevel {
69
30
  NONE = 0,
70
31
  ERROR = 1,
@@ -169,10 +130,8 @@ interface RuntimeInfo {
169
130
  }
170
131
  declare function detectRuntime(): RuntimeInfo;
171
132
 
172
- declare function maybeRegisterESMLoader(): boolean;
173
-
174
133
  declare namespace init {
175
134
  export { };
176
135
  }
177
136
 
178
- export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMaskingConfig, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, VercelAIInstrumentation, WithSessionId, detectRuntime, emitEvent, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, maybeRegisterESMLoader, setLogLevel };
137
+ export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMaskingConfig, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, WithSessionId, detectRuntime, emitEvent, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, setLogLevel };