@coralogix/browser 2.2.0 → 2.4.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.
@@ -1,14 +1,22 @@
1
1
  import { InstrumentationBase, InstrumentationConfig } from '@opentelemetry/instrumentation';
2
2
  import { CoralogixLogSeverity } from '../types-external';
3
+ import { CoralogixRumLabels } from '../types';
3
4
  export declare const CUSTOM_INSTRUMENTATION_VERSION = "1";
4
5
  export declare enum LogSource {
5
6
  CODE = "code"
6
7
  }
8
+ interface CustomLogParams {
9
+ severity: CoralogixLogSeverity;
10
+ message: string;
11
+ data?: any;
12
+ labels?: CoralogixRumLabels;
13
+ }
7
14
  export declare class CoralogixCustomLogInstrumentation extends InstrumentationBase {
8
15
  private stringifyCustomLogData;
9
16
  constructor(config: InstrumentationConfig);
10
17
  protected init(): void;
11
18
  disable(): void;
12
19
  enable(): void;
13
- log(severity: CoralogixLogSeverity, message: string, data?: any): void;
20
+ log({ severity, message, data, labels }: CustomLogParams): void;
14
21
  }
22
+ export {};
package/src/types.d.ts CHANGED
@@ -106,13 +106,13 @@ export interface CoralogixOtelWebOptionsInstrumentations {
106
106
  web_vitals?: boolean | CoralogixWebVitalsInstrumentationConfig;
107
107
  }
108
108
  interface SendLog {
109
- log: (severity: CoralogixLogSeverity, message: string, data?: any) => void;
110
- debug: (message: string, data?: any) => void;
111
- verbose: (message: string, data?: any) => void;
112
- info: (message: string, data?: any) => void;
113
- warn: (message: string, data?: any) => void;
114
- error: (message: string, data?: any) => void;
115
- critical: (message: string, data?: any) => void;
109
+ log: (severity: CoralogixLogSeverity, message: string, data?: any, labels?: CoralogixRumLabels) => void;
110
+ debug: (message: string, data?: any, labels?: CoralogixRumLabels) => void;
111
+ verbose: (message: string, data?: any, labels?: CoralogixRumLabels) => void;
112
+ info: (message: string, data?: any, labels?: CoralogixRumLabels) => void;
113
+ warn: (message: string, data?: any, labels?: CoralogixRumLabels) => void;
114
+ error: (message: string, data?: any, labels?: CoralogixRumLabels) => void;
115
+ critical: (message: string, data?: any, labels?: CoralogixRumLabels) => void;
116
116
  }
117
117
  export type UrlBlueprinter = (url: string) => string;
118
118
  export interface UrlBlueprinters {
package/src/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.2.0";
1
+ export declare const SDK_VERSION = "2.4.0";