@coralogix/browser 3.24.0 → 4.0.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/CHANGELOG.md +20 -0
- package/LICENSE +65 -0
- package/README.md +9 -1
- package/index.esm.js +1 -1
- package/index.esm2.js +2663 -3517
- package/package.json +14 -11
- package/sessionRecorder.esm.js +2292 -2639
- package/src/custom-spans/custom-spans.utils.d.ts +1 -2
- package/src/instrumentations/network/constants.d.ts +5 -0
- package/src/instrumentations/network/network.utils.d.ts +3 -0
- package/src/otel/rum-span-attributes.types.d.ts +1 -0
- package/src/tools/cx-shimmer.d.ts +2 -0
- package/src/types.d.ts +5 -8
- package/src/version.d.ts +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CustomTracerIgnoredInstruments, GlobalSpan } from './custom-spans.types';
|
|
2
|
-
import { Tracer } from '@opentelemetry/
|
|
3
|
-
import { Span } from '@opentelemetry/api';
|
|
2
|
+
import { Span, Tracer } from '@opentelemetry/api';
|
|
4
3
|
export declare function addGlobalSpanByTraceId(traceId: string, globalSpan: GlobalSpan): void;
|
|
5
4
|
export declare function getGlobalSpanByTraceId(traceId: string): GlobalSpan | undefined;
|
|
6
5
|
export declare function clearGlobalSpanMap(): void;
|
|
@@ -3,7 +3,12 @@ export declare const NetworkInstrumentationAttributes: {
|
|
|
3
3
|
RESPONSE_HEADERS: string;
|
|
4
4
|
RESPONSE_PAYLOAD: string;
|
|
5
5
|
REQUEST_PAYLOAD: string;
|
|
6
|
+
RESPONSE_CONTENT_LENGTH: string;
|
|
7
|
+
STATUS_TEXT: string;
|
|
8
|
+
STATUS_CODE: string;
|
|
6
9
|
};
|
|
10
|
+
export declare const UNKNOWN_STATUS_TEXT = "Unknown";
|
|
11
|
+
export declare const HTTP_STATUS_TEXT: Record<number, string>;
|
|
7
12
|
export declare enum FetchSource {
|
|
8
13
|
FETCH = "fetch"
|
|
9
14
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { Span } from '@opentelemetry/api';
|
|
2
2
|
export declare function checkAttachingNetworkSpanToGlobalSpan(span: Span): void;
|
|
3
|
+
export declare function setResponseContentLength(span: Span, contentLength: string | null | undefined): void;
|
|
4
|
+
export declare function setResponseStatusText(span: Span, statusText: string | null | undefined): void;
|
|
5
|
+
export declare function setResponseStatusCode(span: Span, status: number | undefined): void;
|
|
@@ -30,6 +30,7 @@ export interface CxRumSpanAttributes extends Attributes {
|
|
|
30
30
|
'cx_rum.network_request_context.url'?: string;
|
|
31
31
|
'cx_rum.network_request_context.status_code'?: number;
|
|
32
32
|
'cx_rum.network_request_context.method'?: string;
|
|
33
|
+
'cx_rum.network_request_context.response_content_length'?: number;
|
|
33
34
|
}
|
|
34
35
|
export declare function buildCxRumSpanAttributes(attrs: CxRumSpanAttributes): Attributes;
|
|
35
36
|
export declare function buildRumContextAttributes(cxRumEvent: CxRumEvent, resolvedLabels: CoralogixRumLabels): Attributes;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const wrap: <Nodule extends object, FieldName extends keyof Nodule>(nodule: Nodule, name: FieldName, wrapper: (original: Nodule[FieldName], name: FieldName) => Nodule[FieldName]) => Nodule[FieldName] | undefined;
|
|
2
|
+
export declare const unwrap: <Nodule extends object>(nodule: Nodule, name: keyof Nodule) => void;
|
package/src/types.d.ts
CHANGED
|
@@ -235,7 +235,7 @@ export interface NetworkRequestContext {
|
|
|
235
235
|
subdomain?: string;
|
|
236
236
|
domain?: string;
|
|
237
237
|
status_text: string;
|
|
238
|
-
response_content_length
|
|
238
|
+
response_content_length?: number;
|
|
239
239
|
duration: number;
|
|
240
240
|
source: EventSource;
|
|
241
241
|
request_headers?: Map<string, string>;
|
|
@@ -431,13 +431,10 @@ export interface PrevSession extends Session {
|
|
|
431
431
|
hasScreenshot: boolean;
|
|
432
432
|
}
|
|
433
433
|
export declare enum OtelNetworkAttrs {
|
|
434
|
-
METHOD = "http.method",
|
|
435
|
-
URL = "
|
|
436
|
-
STATUS_CODE = "http.status_code",
|
|
437
|
-
HOST = "
|
|
438
|
-
SCHEME = "http.scheme",
|
|
439
|
-
STATUS_TEXT = "http.status_text",
|
|
440
|
-
RESPONSE_CONTENT_LENGTH = "http.response_content_length"
|
|
434
|
+
METHOD = "http.request.method",
|
|
435
|
+
URL = "url.full",
|
|
436
|
+
STATUS_CODE = "http.response.status_code",
|
|
437
|
+
HOST = "server.address"
|
|
441
438
|
}
|
|
442
439
|
export type Browser = 'Chrome' | 'Edge' | 'Firefox' | 'Safari' | 'Opera' | 'IE' | 'Unknown';
|
|
443
440
|
export type OS = 'Windows' | 'MacOS' | 'Linux' | 'iOS' | 'Android' | 'Tizen' | 'webOS' | 'Unknown';
|
package/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "4.0.0";
|