Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datadog/browser-rum-core

Package Overview
Dependencies
Maintainers
1
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/browser-rum-core - npm Package Compare versions

Comparing version 5.32.0 to 5.33.0

1

cjs/browser/performanceObservable.d.ts

@@ -59,2 +59,3 @@ import type { Duration, RelativeTime } from '@datadog/browser-core';

traceId?: string;
deliveryType?: 'cache' | 'navigational-prefetch' | '';
toJSON(): Omit<PerformanceEntry, 'toJSON'>;

@@ -61,0 +62,0 @@ }

@@ -58,3 +58,19 @@ import type { Duration, ClocksState, RelativeTime, TimeStamp, ValueHistory } from '@datadog/browser-core';

isStopped: () => boolean;
clone: () => any;
clone: () => {
event: MouseEventOnElement;
stop: (newActivityEndTime?: TimeStamp) => void;
stopObservable: Observable<void>;
readonly hasError: boolean;
readonly hasPageActivity: boolean;
getUserActivity: () => UserActivity;
addFrustration: (frustrationType: FrustrationType) => void;
startClocks: {
relative: RelativeTime;
timeStamp: TimeStamp;
};
isStopped: () => boolean;
clone: /*elided*/ any;
validate: (domEvents?: Event[]) => void;
discard: () => void;
};
validate: (domEvents?: Event[]) => void;

@@ -61,0 +77,0 @@ discard: () => void;

2

cjs/domain/assembly.js

@@ -65,3 +65,3 @@ "use strict";

},
browser_sdk_version: (0, browser_core_1.canUseEventBridge)() ? "5.32.0" : undefined,
browser_sdk_version: (0, browser_core_1.canUseEventBridge)() ? "5.33.0" : undefined,
},

@@ -68,0 +68,0 @@ application: {

@@ -72,3 +72,3 @@ import type { Configuration, InitConfiguration, MatchOption } from '@datadog/browser-core';

/**
* If the session is sampled for Session Replay, only start the recording when `startSessionReplayRecording()` is called, instead of at the beginning of the session.
* If the session is sampled for Session Replay, only start the recording when `startSessionReplayRecording()` is called, instead of at the beginning of the session. Default: if startSessionReplayRecording is 0, true; otherwise, false.
* See [Session Replay Usage](https://docs.datadoghq.com/real_user_monitoring/session_replay/browser/#usage) for further information.

@@ -75,0 +75,0 @@ */

@@ -31,2 +31,3 @@ "use strict";

}
var sessionReplaySampleRate = (_a = initConfiguration.sessionReplaySampleRate) !== null && _a !== void 0 ? _a : 0;
return (0, browser_core_1.assign)({

@@ -36,4 +37,6 @@ applicationId: initConfiguration.applicationId,

actionNameAttribute: initConfiguration.actionNameAttribute,
sessionReplaySampleRate: (_a = initConfiguration.sessionReplaySampleRate) !== null && _a !== void 0 ? _a : 0,
startSessionReplayRecordingManually: !!initConfiguration.startSessionReplayRecordingManually,
sessionReplaySampleRate: sessionReplaySampleRate,
startSessionReplayRecordingManually: initConfiguration.startSessionReplayRecordingManually !== undefined
? !!initConfiguration.startSessionReplayRecordingManually
: sessionReplaySampleRate === 0,
traceSampleRate: initConfiguration.traceSampleRate,

@@ -40,0 +43,0 @@ allowedTracingUrls: allowedTracingUrls,

@@ -27,3 +27,3 @@ "use strict";

var error = _a.error, handlingStack = _a.handlingStack, startClocks = _a.startClocks, customerContext = _a.context;
var stackTrace = error instanceof Error ? (0, browser_core_1.computeStackTrace)(error) : undefined;
var stackTrace = (0, browser_core_1.isError)(error) ? (0, browser_core_1.computeStackTrace)(error) : undefined;
var rawError = (0, browser_core_1.computeRawError)({

@@ -30,0 +30,0 @@ stackTrace: stackTrace,

@@ -67,2 +67,3 @@ "use strict";

url: (0, resourceUtils_1.isLongDataUrl)(request.url) ? (0, resourceUtils_1.sanitizeDataUrl)(request.url) : request.url,
delivery_type: matchingTiming && (0, resourceUtils_1.computeResourceEntryDeliveryType)(matchingTiming),
},

@@ -105,2 +106,3 @@ type: "resource" /* RumEventType.RESOURCE */,

protocol: (0, resourceUtils_1.computeResourceEntryProtocol)(entry),
delivery_type: (0, resourceUtils_1.computeResourceEntryDeliveryType)(entry),
},

@@ -107,0 +109,0 @@ type: "resource" /* RumEventType.RESOURCE */,

import type { ServerDuration } from '@datadog/browser-core';
import { ResourceType } from '@datadog/browser-core';
import type { RumPerformanceResourceTiming } from '../../browser/performanceObservable';
import type { ResourceEntryDetailsElement } from '../../rawRumEvent.types';
import type { ResourceEntryDetailsElement, DeliveryType } from '../../rawRumEvent.types';
export interface ResourceEntryDetails {

@@ -33,2 +33,8 @@ worker?: ResourceEntryDetailsElement;

export declare function computeResourceEntryProtocol(entry: RumPerformanceResourceTiming): string | undefined;
/**
* Handles the 'deliveryType' property to distinguish between supported values ('cache', 'navigational-prefetch'),
* undefined (unsupported in some browsers), and other cases ('other' for unknown or unrecognized values).
* see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/deliveryType
*/
export declare function computeResourceEntryDeliveryType(entry: RumPerformanceResourceTiming): DeliveryType | undefined;
export declare function computeResourceEntrySize(entry: RumPerformanceResourceTiming): {

@@ -35,0 +41,0 @@ size: number;

@@ -11,2 +11,3 @@ "use strict";

exports.computeResourceEntryProtocol = computeResourceEntryProtocol;
exports.computeResourceEntryDeliveryType = computeResourceEntryDeliveryType;
exports.computeResourceEntrySize = computeResourceEntrySize;

@@ -147,2 +148,10 @@ exports.isAllowedRequestUrl = isAllowedRequestUrl;

}
/**
* Handles the 'deliveryType' property to distinguish between supported values ('cache', 'navigational-prefetch'),
* undefined (unsupported in some browsers), and other cases ('other' for unknown or unrecognized values).
* see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/deliveryType
*/
function computeResourceEntryDeliveryType(entry) {
return entry.deliveryType === '' ? 'other' : entry.deliveryType;
}
function computeResourceEntrySize(entry) {

@@ -149,0 +158,0 @@ // Make sure a request actually occurred

@@ -38,2 +38,3 @@ import type { Context, Duration, ErrorSource, ErrorHandling, ResourceType, ServerDuration, TimeStamp, RawErrorCause, DefaultPrivacyLevel, Connectivity, Csp } from '@datadog/browser-core';

protocol?: string;
delivery_type?: DeliveryType;
};

@@ -165,2 +166,3 @@ _dd: {

}
export type DeliveryType = 'cache' | 'navigational-prefetch' | 'other';
export type InvokerType = 'user-callback' | 'event-listener' | 'resolve-promise' | 'reject-promise' | 'classic-script' | 'module-script';

@@ -167,0 +169,0 @@ export interface RawRumLongAnimationFrameEvent {

@@ -144,2 +144,6 @@ /**

};
/**
* The strategy of how the auto click action name is computed
*/
name_source?: 'custom_attribute' | 'mask_placeholder' | 'standard_attribute' | 'text_content' | 'mask_disallowed' | 'blank';
[k: string]: unknown;

@@ -670,2 +674,6 @@ };

/**
* Delivery type of the resource
*/
readonly delivery_type?: 'cache' | 'navigational-prefetch' | 'other';
/**
* The provider for this resource

@@ -672,0 +680,0 @@ */

@@ -59,2 +59,3 @@ import type { Duration, RelativeTime } from '@datadog/browser-core';

traceId?: string;
deliveryType?: 'cache' | 'navigational-prefetch' | '';
toJSON(): Omit<PerformanceEntry, 'toJSON'>;

@@ -61,0 +62,0 @@ }

@@ -58,3 +58,19 @@ import type { Duration, ClocksState, RelativeTime, TimeStamp, ValueHistory } from '@datadog/browser-core';

isStopped: () => boolean;
clone: () => any;
clone: () => {
event: MouseEventOnElement;
stop: (newActivityEndTime?: TimeStamp) => void;
stopObservable: Observable<void>;
readonly hasError: boolean;
readonly hasPageActivity: boolean;
getUserActivity: () => UserActivity;
addFrustration: (frustrationType: FrustrationType) => void;
startClocks: {
relative: RelativeTime;
timeStamp: TimeStamp;
};
isStopped: () => boolean;
clone: /*elided*/ any;
validate: (domEvents?: Event[]) => void;
discard: () => void;
};
validate: (domEvents?: Event[]) => void;

@@ -61,0 +77,0 @@ discard: () => void;

@@ -62,3 +62,3 @@ import { combine, isEmptyObject, timeStampNow, currentDrift, display, createEventRateLimiter, canUseEventBridge, assign, round, isExperimentalFeatureEnabled, ExperimentalFeature, getConnectivity, } from '@datadog/browser-core';

},
browser_sdk_version: canUseEventBridge() ? "5.32.0" : undefined,
browser_sdk_version: canUseEventBridge() ? "5.33.0" : undefined,
},

@@ -65,0 +65,0 @@ application: {

@@ -72,3 +72,3 @@ import type { Configuration, InitConfiguration, MatchOption } from '@datadog/browser-core';

/**
* If the session is sampled for Session Replay, only start the recording when `startSessionReplayRecording()` is called, instead of at the beginning of the session.
* If the session is sampled for Session Replay, only start the recording when `startSessionReplayRecording()` is called, instead of at the beginning of the session. Default: if startSessionReplayRecording is 0, true; otherwise, false.
* See [Session Replay Usage](https://docs.datadoghq.com/real_user_monitoring/session_replay/browser/#usage) for further information.

@@ -75,0 +75,0 @@ */

@@ -26,2 +26,3 @@ import { getType, arrayFrom, isMatchOption, serializeConfiguration, assign, DefaultPrivacyLevel, TraceContextInjection, display, objectHasValue, validateAndBuildConfiguration, isSampleRate, } from '@datadog/browser-core';

}
var sessionReplaySampleRate = (_a = initConfiguration.sessionReplaySampleRate) !== null && _a !== void 0 ? _a : 0;
return assign({

@@ -31,4 +32,6 @@ applicationId: initConfiguration.applicationId,

actionNameAttribute: initConfiguration.actionNameAttribute,
sessionReplaySampleRate: (_a = initConfiguration.sessionReplaySampleRate) !== null && _a !== void 0 ? _a : 0,
startSessionReplayRecordingManually: !!initConfiguration.startSessionReplayRecordingManually,
sessionReplaySampleRate: sessionReplaySampleRate,
startSessionReplayRecordingManually: initConfiguration.startSessionReplayRecordingManually !== undefined
? !!initConfiguration.startSessionReplayRecordingManually
: sessionReplaySampleRate === 0,
traceSampleRate: initConfiguration.traceSampleRate,

@@ -35,0 +38,0 @@ allowedTracingUrls: allowedTracingUrls,

@@ -1,2 +0,2 @@

import { isEmptyObject, assign, ErrorSource, generateUUID, computeRawError, computeStackTrace, Observable, trackRuntimeError, } from '@datadog/browser-core';
import { isEmptyObject, assign, ErrorSource, generateUUID, computeRawError, computeStackTrace, Observable, trackRuntimeError, isError, } from '@datadog/browser-core';
import { trackConsoleError } from './trackConsoleError';

@@ -23,3 +23,3 @@ import { trackReportError } from './trackReportError';

var error = _a.error, handlingStack = _a.handlingStack, startClocks = _a.startClocks, customerContext = _a.context;
var stackTrace = error instanceof Error ? computeStackTrace(error) : undefined;
var stackTrace = isError(error) ? computeStackTrace(error) : undefined;
var rawError = computeRawError({

@@ -26,0 +26,0 @@ stackTrace: stackTrace,

@@ -5,3 +5,3 @@ import { combine, generateUUID, toServerDuration, relativeToClocks, assign, isNumber, createTaskQueue, } from '@datadog/browser-core';

import { matchRequestResourceEntry } from './matchRequestResourceEntry';
import { computeResourceEntryDetails, computeResourceEntryDuration, computeResourceEntryType, computeResourceEntrySize, computeResourceEntryProtocol, isResourceEntryRequestType, isLongDataUrl, sanitizeDataUrl, } from './resourceUtils';
import { computeResourceEntryDetails, computeResourceEntryDuration, computeResourceEntryType, computeResourceEntrySize, computeResourceEntryProtocol, computeResourceEntryDeliveryType, isResourceEntryRequestType, isLongDataUrl, sanitizeDataUrl, } from './resourceUtils';
import { retrieveInitialDocumentResourceTiming } from './retrieveInitialDocumentResourceTiming';

@@ -65,2 +65,3 @@ export function startResourceCollection(lifeCycle, configuration, pageStateHistory, taskQueue, retrieveInitialDocumentResourceTimingImpl) {

url: isLongDataUrl(request.url) ? sanitizeDataUrl(request.url) : request.url,
delivery_type: matchingTiming && computeResourceEntryDeliveryType(matchingTiming),
},

@@ -103,2 +104,3 @@ type: "resource" /* RumEventType.RESOURCE */,

protocol: computeResourceEntryProtocol(entry),
delivery_type: computeResourceEntryDeliveryType(entry),
},

@@ -105,0 +107,0 @@ type: "resource" /* RumEventType.RESOURCE */,

import type { ServerDuration } from '@datadog/browser-core';
import { ResourceType } from '@datadog/browser-core';
import type { RumPerformanceResourceTiming } from '../../browser/performanceObservable';
import type { ResourceEntryDetailsElement } from '../../rawRumEvent.types';
import type { ResourceEntryDetailsElement, DeliveryType } from '../../rawRumEvent.types';
export interface ResourceEntryDetails {

@@ -33,2 +33,8 @@ worker?: ResourceEntryDetailsElement;

export declare function computeResourceEntryProtocol(entry: RumPerformanceResourceTiming): string | undefined;
/**
* Handles the 'deliveryType' property to distinguish between supported values ('cache', 'navigational-prefetch'),
* undefined (unsupported in some browsers), and other cases ('other' for unknown or unrecognized values).
* see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/deliveryType
*/
export declare function computeResourceEntryDeliveryType(entry: RumPerformanceResourceTiming): DeliveryType | undefined;
export declare function computeResourceEntrySize(entry: RumPerformanceResourceTiming): {

@@ -35,0 +41,0 @@ size: number;

@@ -132,2 +132,10 @@ import { addTelemetryDebug, elapsed, getPathName, includes, isValidUrl, toServerDuration, isIntakeUrl, } from '@datadog/browser-core';

}
/**
* Handles the 'deliveryType' property to distinguish between supported values ('cache', 'navigational-prefetch'),
* undefined (unsupported in some browsers), and other cases ('other' for unknown or unrecognized values).
* see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/deliveryType
*/
export function computeResourceEntryDeliveryType(entry) {
return entry.deliveryType === '' ? 'other' : entry.deliveryType;
}
export function computeResourceEntrySize(entry) {

@@ -134,0 +142,0 @@ // Make sure a request actually occurred

@@ -38,2 +38,3 @@ import type { Context, Duration, ErrorSource, ErrorHandling, ResourceType, ServerDuration, TimeStamp, RawErrorCause, DefaultPrivacyLevel, Connectivity, Csp } from '@datadog/browser-core';

protocol?: string;
delivery_type?: DeliveryType;
};

@@ -165,2 +166,3 @@ _dd: {

}
export type DeliveryType = 'cache' | 'navigational-prefetch' | 'other';
export type InvokerType = 'user-callback' | 'event-listener' | 'resolve-promise' | 'reject-promise' | 'classic-script' | 'module-script';

@@ -167,0 +169,0 @@ export interface RawRumLongAnimationFrameEvent {

@@ -144,2 +144,6 @@ /**

};
/**
* The strategy of how the auto click action name is computed
*/
name_source?: 'custom_attribute' | 'mask_placeholder' | 'standard_attribute' | 'text_content' | 'mask_disallowed' | 'blank';
[k: string]: unknown;

@@ -670,2 +674,6 @@ };

/**
* Delivery type of the resource
*/
readonly delivery_type?: 'cache' | 'navigational-prefetch' | 'other';
/**
* The provider for this resource

@@ -672,0 +680,0 @@ */

{
"name": "@datadog/browser-rum-core",
"version": "5.32.0",
"version": "5.33.0",
"license": "Apache-2.0",

@@ -15,3 +15,3 @@ "main": "cjs/index.js",

"dependencies": {
"@datadog/browser-core": "5.32.0"
"@datadog/browser-core": "5.33.0"
},

@@ -32,3 +32,3 @@ "devDependencies": {

},
"gitHead": "bbd2e32d488059fcb4dfea26a14c8113f63f326e"
"gitHead": "4ba909fd0850f23e2d9ee3cbf520720e434912dc"
}

@@ -66,2 +66,3 @@ import type { Duration, RelativeTime, TimeoutId } from '@datadog/browser-core'

traceId?: string
deliveryType?: 'cache' | 'navigational-prefetch' | ''
toJSON(): Omit<PerformanceEntry, 'toJSON'>

@@ -68,0 +69,0 @@ }

@@ -93,3 +93,3 @@ import type { Configuration, InitConfiguration, MatchOption, RawTelemetryConfiguration } from '@datadog/browser-core'

/**
* If the session is sampled for Session Replay, only start the recording when `startSessionReplayRecording()` is called, instead of at the beginning of the session.
* If the session is sampled for Session Replay, only start the recording when `startSessionReplayRecording()` is called, instead of at the beginning of the session. Default: if startSessionReplayRecording is 0, true; otherwise, false.
* See [Session Replay Usage](https://docs.datadoghq.com/real_user_monitoring/session_replay/browser/#usage) for further information.

@@ -192,2 +192,4 @@ */

const sessionReplaySampleRate = initConfiguration.sessionReplaySampleRate ?? 0
return assign(

@@ -198,4 +200,7 @@ {

actionNameAttribute: initConfiguration.actionNameAttribute,
sessionReplaySampleRate: initConfiguration.sessionReplaySampleRate ?? 0,
startSessionReplayRecordingManually: !!initConfiguration.startSessionReplayRecordingManually,
sessionReplaySampleRate,
startSessionReplayRecordingManually:
initConfiguration.startSessionReplayRecordingManually !== undefined
? !!initConfiguration.startSessionReplayRecordingManually
: sessionReplaySampleRate === 0,
traceSampleRate: initConfiguration.traceSampleRate,

@@ -202,0 +207,0 @@ allowedTracingUrls,

@@ -13,2 +13,3 @@ import type { Context, RawError, ClocksState } from '@datadog/browser-core'

NonErrorPrefix,
isError,
} from '@datadog/browser-core'

@@ -75,3 +76,3 @@ import type { RumConfiguration } from '../configuration'

) => {
const stackTrace = error instanceof Error ? computeStackTrace(error) : undefined
const stackTrace = isError(error) ? computeStackTrace(error) : undefined
const rawError = computeRawError({

@@ -78,0 +79,0 @@ stackTrace,

@@ -35,2 +35,3 @@ import type { ClocksState, Duration } from '@datadog/browser-core'

computeResourceEntryProtocol,
computeResourceEntryDeliveryType,
isResourceEntryRequestType,

@@ -113,2 +114,3 @@ isLongDataUrl,

url: isLongDataUrl(request.url) ? sanitizeDataUrl(request.url) : request.url,
delivery_type: matchingTiming && computeResourceEntryDeliveryType(matchingTiming),
},

@@ -162,2 +164,3 @@ type: RumEventType.RESOURCE as const,

protocol: computeResourceEntryProtocol(entry),
delivery_type: computeResourceEntryDeliveryType(entry),
},

@@ -164,0 +167,0 @@ type: RumEventType.RESOURCE as const,

@@ -15,3 +15,3 @@ import type { RelativeTime, ServerDuration } from '@datadog/browser-core'

import type { ResourceEntryDetailsElement } from '../../rawRumEvent.types'
import type { ResourceEntryDetailsElement, DeliveryType } from '../../rawRumEvent.types'

@@ -197,2 +197,11 @@ export interface ResourceEntryDetails {

/**
* Handles the 'deliveryType' property to distinguish between supported values ('cache', 'navigational-prefetch'),
* undefined (unsupported in some browsers), and other cases ('other' for unknown or unrecognized values).
* see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/deliveryType
*/
export function computeResourceEntryDeliveryType(entry: RumPerformanceResourceTiming): DeliveryType | undefined {
return entry.deliveryType === '' ? 'other' : entry.deliveryType
}
export function computeResourceEntrySize(entry: RumPerformanceResourceTiming) {

@@ -199,0 +208,0 @@ // Make sure a request actually occurred

@@ -53,2 +53,3 @@ import type {

protocol?: string
delivery_type?: DeliveryType
}

@@ -189,2 +190,4 @@ _dd: {

export type DeliveryType = 'cache' | 'navigational-prefetch' | 'other'
export type InvokerType =

@@ -191,0 +194,0 @@ | 'user-callback'

@@ -153,2 +153,12 @@ /* eslint-disable */

}
/**
* The strategy of how the auto click action name is computed
*/
name_source?:
| 'custom_attribute'
| 'mask_placeholder'
| 'standard_attribute'
| 'text_content'
| 'mask_disallowed'
| 'blank'
[k: string]: unknown

@@ -725,2 +735,6 @@ }

/**
* Delivery type of the resource
*/
readonly delivery_type?: 'cache' | 'navigational-prefetch' | 'other'
/**
* The provider for this resource

@@ -727,0 +741,0 @@ */

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc