@sentry/replay 11.5.0 → 11.6.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/build/npm/cjs/index.js +6 -5
- package/build/npm/cjs/index.js.map +1 -1
- package/build/npm/esm/index.js +7 -6
- package/build/npm/esm/index.js.map +1 -1
- package/build/npm/esm/package.json +1 -1
- package/build/npm/types/util/createPerformanceEntries.d.ts +5 -0
- package/build/npm/types/util/createPerformanceEntries.d.ts.map +1 -1
- package/package.json +4 -4
package/build/npm/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GLOBAL_OBJ, normalize, isObjectLike, fill,
|
|
1
|
+
import { GLOBAL_OBJ, normalize, isObjectLike, fill, _INTERNAL_performanceTimeToSeconds, debug as debug$1, severityLevelFromString, captureException, addBreadcrumb, uuid4, getClient, getCurrentScope, getActiveSpan, getDynamicSamplingContextFromSpan, isSentryRequestUrl, stringMatchesSomePattern, addEventProcessor, debounce as debounce$1, createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader, prepareEvent, getIsolationScope, updateRateLimits, isRateLimited, setContext, getRootSpan, spanToJSON, isBrowser, safeSetSpanJSONAttributes, parseSampleRate, consoleSandbox } from '@sentry/core';
|
|
2
2
|
import { setTimeout as setTimeout$3, htmlTreeAsString, addPerformanceInstrumentationHandler, addLcpInstrumentationHandler, addClsInstrumentationHandler, addInpInstrumentationHandler, getLocationHref, serializeFormData, getFetchRequestArgBody, getBodyString, SENTRY_XHR_DATA_KEY, parseXhrResponseHeaders, addClickKeypressInstrumentationHandler, addHistoryInstrumentationHandler } from '@sentry/browser-utils';
|
|
3
3
|
|
|
4
4
|
const WINDOW = GLOBAL_OBJ;
|
|
@@ -5076,8 +5076,8 @@ function createPerformanceEntry(entry) {
|
|
|
5076
5076
|
}
|
|
5077
5077
|
return entryType(entry);
|
|
5078
5078
|
}
|
|
5079
|
-
function getAbsoluteTime(time) {
|
|
5080
|
-
return (
|
|
5079
|
+
function getAbsoluteTime(time, entryStartTime = time) {
|
|
5080
|
+
return _INTERNAL_performanceTimeToSeconds(time, entryStartTime);
|
|
5081
5081
|
}
|
|
5082
5082
|
function createPaintEntry(entry) {
|
|
5083
5083
|
const { duration, entryType, name, startTime } = entry;
|
|
@@ -5114,7 +5114,7 @@ function createNavigationEntry(entry) {
|
|
|
5114
5114
|
return {
|
|
5115
5115
|
type: `${entryType}.${type}`,
|
|
5116
5116
|
start: getAbsoluteTime(startTime),
|
|
5117
|
-
end: getAbsoluteTime(domComplete),
|
|
5117
|
+
end: getAbsoluteTime(domComplete, startTime),
|
|
5118
5118
|
name,
|
|
5119
5119
|
data: {
|
|
5120
5120
|
size: transferSize,
|
|
@@ -5149,7 +5149,7 @@ function createResourceEntry(entry) {
|
|
|
5149
5149
|
return {
|
|
5150
5150
|
type: `${entryType}.${initiatorType}`,
|
|
5151
5151
|
start: getAbsoluteTime(startTime),
|
|
5152
|
-
end: getAbsoluteTime(responseEnd),
|
|
5152
|
+
end: getAbsoluteTime(responseEnd, startTime),
|
|
5153
5153
|
name,
|
|
5154
5154
|
data: {
|
|
5155
5155
|
size: transferSize,
|
|
@@ -5195,7 +5195,8 @@ function getInteractionToNextPaint(metric) {
|
|
|
5195
5195
|
function getWebVital(metric, name, nodes, attributions) {
|
|
5196
5196
|
const value = metric.value;
|
|
5197
5197
|
const rating = metric.rating;
|
|
5198
|
-
const
|
|
5198
|
+
const lastEntry = metric.entries[metric.entries.length - 1];
|
|
5199
|
+
const end = getAbsoluteTime(lastEntry?.startTime ?? (metric.navigationStartTime ?? 0) + value);
|
|
5199
5200
|
return {
|
|
5200
5201
|
type: "web-vital",
|
|
5201
5202
|
name,
|