@sentry/apm
Advanced tools
Comparing version 5.20.0 to 5.20.1
@@ -255,3 +255,9 @@ import { Hub } from '@sentry/hub'; | ||
} | ||
/** | ||
* Helper function to start child on transactions. This function will make sure that the transaction will | ||
* use the start timestamp of the created child span if it is earlier than the transactions actual | ||
* start timestamp. | ||
*/ | ||
export declare function _startChild(parent: Span, { startTimestamp, ...ctx }: SpanContext): Span; | ||
export {}; | ||
//# sourceMappingURL=tracing.d.ts.map |
@@ -361,3 +361,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
function addPerformanceNavigationTiming(parent, entry, event) { | ||
parent.startChild({ | ||
_startChild(parent, { | ||
description: event, | ||
@@ -371,3 +371,3 @@ endTimestamp: timeOrigin + Tracing._msToSec(entry[event + "End"]), | ||
function addRequest(parent, entry) { | ||
parent.startChild({ | ||
_startChild(parent, { | ||
description: 'request', | ||
@@ -378,3 +378,3 @@ endTimestamp: timeOrigin + Tracing._msToSec(entry.responseEnd), | ||
}); | ||
parent.startChild({ | ||
_startChild(parent, { | ||
description: 'response', | ||
@@ -423,8 +423,8 @@ endTimestamp: timeOrigin + Tracing._msToSec(entry.responseEnd), | ||
case 'measure': | ||
var mark = transactionSpan.startChild({ | ||
var mark = _startChild(transactionSpan, { | ||
description: entry.name, | ||
endTimestamp: timeOrigin + startTime + duration, | ||
op: entry.entryType, | ||
startTimestamp: timeOrigin + startTime, | ||
}); | ||
mark.startTimestamp = timeOrigin + startTime; | ||
mark.endTimestamp = mark.startTimestamp + duration; | ||
if (tracingInitMarkStartTime === undefined && entry.name === 'sentry-tracing-init') { | ||
@@ -435,23 +435,14 @@ tracingInitMarkStartTime = mark.startTimestamp; | ||
case 'resource': | ||
var resourceName_1 = entry.name.replace(window.location.origin, ''); | ||
if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') { | ||
// We need to update existing spans with new timing info | ||
if (transactionSpan.spanRecorder) { | ||
transactionSpan.spanRecorder.spans.map(function (finishedSpan) { | ||
if (finishedSpan.description && finishedSpan.description.indexOf(resourceName_1) !== -1) { | ||
finishedSpan.startTimestamp = timeOrigin + startTime; | ||
finishedSpan.endTimestamp = finishedSpan.startTimestamp + duration; | ||
} | ||
}); | ||
} | ||
} | ||
else { | ||
var resource = transactionSpan.startChild({ | ||
description: entry.initiatorType + " " + resourceName_1, | ||
var resourceName = entry.name.replace(window.location.origin, ''); | ||
// we already instrument based on fetch and xhr, so we don't need to | ||
// duplicate spans here. | ||
if (entry.initiatorType !== 'xmlhttprequest' && entry.initiatorType !== 'fetch') { | ||
var resource = _startChild(transactionSpan, { | ||
description: entry.initiatorType + " " + resourceName, | ||
endTimestamp: timeOrigin + startTime + duration, | ||
op: "resource", | ||
startTimestamp: timeOrigin + startTime, | ||
}); | ||
resource.startTimestamp = timeOrigin + startTime; | ||
resource.endTimestamp = resource.startTimestamp + duration; | ||
// We remember the entry script end time to calculate the difference to the first init mark | ||
if (entryScriptStartEndTime === undefined && (entryScriptSrc || '').indexOf(resourceName_1) > -1) { | ||
if (entryScriptStartEndTime === undefined && (entryScriptSrc || '').indexOf(resourceName) > -1) { | ||
entryScriptStartEndTime = resource.endTimestamp; | ||
@@ -466,3 +457,3 @@ } | ||
if (entryScriptStartEndTime !== undefined && tracingInitMarkStartTime !== undefined) { | ||
transactionSpan.startChild({ | ||
_startChild(transactionSpan, { | ||
description: 'evaluation', | ||
@@ -798,2 +789,15 @@ endTimestamp: tracingInitMarkStartTime, | ||
} | ||
/** | ||
* Helper function to start child on transactions. This function will make sure that the transaction will | ||
* use the start timestamp of the created child span if it is earlier than the transactions actual | ||
* start timestamp. | ||
*/ | ||
function _startChild(parent, _a) { | ||
var startTimestamp = _a.startTimestamp, ctx = tslib_1.__rest(_a, ["startTimestamp"]); | ||
if (startTimestamp && parent.startTimestamp > startTimestamp) { | ||
parent.startTimestamp = startTimestamp; | ||
} | ||
return parent.startChild(tslib_1.__assign({ startTimestamp: startTimestamp }, ctx)); | ||
} | ||
exports._startChild = _startChild; | ||
//# sourceMappingURL=tracing.js.map |
@@ -255,3 +255,9 @@ import { Hub } from '@sentry/hub'; | ||
} | ||
/** | ||
* Helper function to start child on transactions. This function will make sure that the transaction will | ||
* use the start timestamp of the created child span if it is earlier than the transactions actual | ||
* start timestamp. | ||
*/ | ||
export declare function _startChild(parent: Span, { startTimestamp, ...ctx }: SpanContext): Span; | ||
export {}; | ||
//# sourceMappingURL=tracing.d.ts.map |
@@ -360,3 +360,3 @@ import * as tslib_1 from "tslib"; | ||
function addPerformanceNavigationTiming(parent, entry, event) { | ||
parent.startChild({ | ||
_startChild(parent, { | ||
description: event, | ||
@@ -370,3 +370,3 @@ endTimestamp: timeOrigin + Tracing._msToSec(entry[event + "End"]), | ||
function addRequest(parent, entry) { | ||
parent.startChild({ | ||
_startChild(parent, { | ||
description: 'request', | ||
@@ -377,3 +377,3 @@ endTimestamp: timeOrigin + Tracing._msToSec(entry.responseEnd), | ||
}); | ||
parent.startChild({ | ||
_startChild(parent, { | ||
description: 'response', | ||
@@ -422,8 +422,8 @@ endTimestamp: timeOrigin + Tracing._msToSec(entry.responseEnd), | ||
case 'measure': | ||
var mark = transactionSpan.startChild({ | ||
var mark = _startChild(transactionSpan, { | ||
description: entry.name, | ||
endTimestamp: timeOrigin + startTime + duration, | ||
op: entry.entryType, | ||
startTimestamp: timeOrigin + startTime, | ||
}); | ||
mark.startTimestamp = timeOrigin + startTime; | ||
mark.endTimestamp = mark.startTimestamp + duration; | ||
if (tracingInitMarkStartTime === undefined && entry.name === 'sentry-tracing-init') { | ||
@@ -434,23 +434,14 @@ tracingInitMarkStartTime = mark.startTimestamp; | ||
case 'resource': | ||
var resourceName_1 = entry.name.replace(window.location.origin, ''); | ||
if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') { | ||
// We need to update existing spans with new timing info | ||
if (transactionSpan.spanRecorder) { | ||
transactionSpan.spanRecorder.spans.map(function (finishedSpan) { | ||
if (finishedSpan.description && finishedSpan.description.indexOf(resourceName_1) !== -1) { | ||
finishedSpan.startTimestamp = timeOrigin + startTime; | ||
finishedSpan.endTimestamp = finishedSpan.startTimestamp + duration; | ||
} | ||
}); | ||
} | ||
} | ||
else { | ||
var resource = transactionSpan.startChild({ | ||
description: entry.initiatorType + " " + resourceName_1, | ||
var resourceName = entry.name.replace(window.location.origin, ''); | ||
// we already instrument based on fetch and xhr, so we don't need to | ||
// duplicate spans here. | ||
if (entry.initiatorType !== 'xmlhttprequest' && entry.initiatorType !== 'fetch') { | ||
var resource = _startChild(transactionSpan, { | ||
description: entry.initiatorType + " " + resourceName, | ||
endTimestamp: timeOrigin + startTime + duration, | ||
op: "resource", | ||
startTimestamp: timeOrigin + startTime, | ||
}); | ||
resource.startTimestamp = timeOrigin + startTime; | ||
resource.endTimestamp = resource.startTimestamp + duration; | ||
// We remember the entry script end time to calculate the difference to the first init mark | ||
if (entryScriptStartEndTime === undefined && (entryScriptSrc || '').indexOf(resourceName_1) > -1) { | ||
if (entryScriptStartEndTime === undefined && (entryScriptSrc || '').indexOf(resourceName) > -1) { | ||
entryScriptStartEndTime = resource.endTimestamp; | ||
@@ -465,3 +456,3 @@ } | ||
if (entryScriptStartEndTime !== undefined && tracingInitMarkStartTime !== undefined) { | ||
transactionSpan.startChild({ | ||
_startChild(transactionSpan, { | ||
description: 'evaluation', | ||
@@ -797,2 +788,14 @@ endTimestamp: tracingInitMarkStartTime, | ||
} | ||
/** | ||
* Helper function to start child on transactions. This function will make sure that the transaction will | ||
* use the start timestamp of the created child span if it is earlier than the transactions actual | ||
* start timestamp. | ||
*/ | ||
export function _startChild(parent, _a) { | ||
var startTimestamp = _a.startTimestamp, ctx = tslib_1.__rest(_a, ["startTimestamp"]); | ||
if (startTimestamp && parent.startTimestamp > startTimestamp) { | ||
parent.startTimestamp = startTimestamp; | ||
} | ||
return parent.startChild(tslib_1.__assign({ startTimestamp: startTimestamp }, ctx)); | ||
} | ||
//# sourceMappingURL=tracing.js.map |
{ | ||
"name": "@sentry/apm", | ||
"version": "5.20.0", | ||
"version": "5.20.1", | ||
"description": "Extensions for APM", | ||
@@ -19,7 +19,7 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/browser": "5.20.0", | ||
"@sentry/hub": "5.20.0", | ||
"@sentry/minimal": "5.20.0", | ||
"@sentry/types": "5.20.0", | ||
"@sentry/utils": "5.20.0", | ||
"@sentry/browser": "5.20.1", | ||
"@sentry/hub": "5.20.1", | ||
"@sentry/minimal": "5.20.1", | ||
"@sentry/types": "5.20.1", | ||
"@sentry/utils": "5.20.1", | ||
"tslib": "^1.9.3" | ||
@@ -26,0 +26,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
390254
4330
+ Added@sentry/browser@5.20.1(transitive)
+ Added@sentry/core@5.20.1(transitive)
+ Added@sentry/hub@5.20.1(transitive)
+ Added@sentry/minimal@5.20.1(transitive)
+ Added@sentry/types@5.20.1(transitive)
+ Added@sentry/utils@5.20.1(transitive)
- Removed@sentry/browser@5.20.0(transitive)
- Removed@sentry/core@5.20.0(transitive)
- Removed@sentry/hub@5.20.0(transitive)
- Removed@sentry/minimal@5.20.0(transitive)
- Removed@sentry/types@5.20.0(transitive)
- Removed@sentry/utils@5.20.0(transitive)
Updated@sentry/browser@5.20.1
Updated@sentry/hub@5.20.1
Updated@sentry/minimal@5.20.1
Updated@sentry/types@5.20.1
Updated@sentry/utils@5.20.1