@sentry/vue
Advanced tools
Comparing version 6.17.0 to 6.17.1
@@ -51,46 +51,54 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
var _loop_2 = function (internalHook) { | ||
mixins[internalHook] = function () { | ||
var _a; | ||
var isRoot = this.$root === this; | ||
if (isRoot) { | ||
var activeTransaction = getActiveTransaction(); | ||
if (activeTransaction) { | ||
this.$_sentryRootSpan = | ||
this.$_sentryRootSpan || | ||
activeTransaction.startChild({ | ||
description: 'Application Render', | ||
op: VUE_OP, | ||
}); | ||
} | ||
} | ||
// Skip components that we don't want to track to minimize the noise and give a more granular control to the user | ||
var name = components_1.formatComponentName(this, false); | ||
var shouldTrack = Array.isArray(options.trackComponents) | ||
? options.trackComponents.includes(name) | ||
: options.trackComponents; | ||
// We always want to track root component | ||
if (!isRoot && !shouldTrack) { | ||
return; | ||
} | ||
this.$_sentrySpans = this.$_sentrySpans || {}; | ||
// Start a new span if current hook is a 'before' hook. | ||
// Otherwise, retrieve the current span and finish it. | ||
if (internalHook == internalHooks[0]) { | ||
var activeTransaction = ((_a = this.$root) === null || _a === void 0 ? void 0 : _a.$_sentryRootSpan) || getActiveTransaction(); | ||
if (activeTransaction) { | ||
this.$_sentrySpans[operation] = activeTransaction.startChild({ | ||
description: "Vue <" + name + ">", | ||
op: VUE_OP + "." + operation, | ||
}); | ||
} | ||
} | ||
else { | ||
// The span should already be added via the first handler call (in the 'before' hook) | ||
var span = this.$_sentrySpans[operation]; | ||
// The before hook did not start the tracking span, so the span was not added. | ||
// This is probably because it happened before there is an active transaction | ||
if (!span) | ||
return; | ||
span.finish(); | ||
finishRootSpan(this, utils_1.timestampInSeconds(), options.timeout); | ||
} | ||
}; | ||
}; | ||
try { | ||
for (var internalHooks_1 = (e_2 = void 0, tslib_1.__values(internalHooks)), internalHooks_1_1 = internalHooks_1.next(); !internalHooks_1_1.done; internalHooks_1_1 = internalHooks_1.next()) { | ||
var internalHook = internalHooks_1_1.value; | ||
mixins[internalHook] = function () { | ||
var _a; | ||
var isRoot = this.$root === this; | ||
if (isRoot) { | ||
var activeTransaction = getActiveTransaction(); | ||
if (activeTransaction) { | ||
this.$_sentryRootSpan = | ||
this.$_sentryRootSpan || | ||
activeTransaction.startChild({ | ||
description: 'Application Render', | ||
op: VUE_OP, | ||
}); | ||
} | ||
} | ||
// Skip components that we don't want to track to minimize the noise and give a more granular control to the user | ||
var name = components_1.formatComponentName(this, false); | ||
var shouldTrack = Array.isArray(options.trackComponents) | ||
? options.trackComponents.includes(name) | ||
: options.trackComponents; | ||
// We always want to track root component | ||
if (!isRoot && !shouldTrack) { | ||
return; | ||
} | ||
this.$_sentrySpans = this.$_sentrySpans || {}; | ||
// On the first handler call (before), it'll be undefined, as `$once` will add it in the future. | ||
// However, on the second call (after), it'll be already in place. | ||
var span = this.$_sentrySpans[operation]; | ||
if (span) { | ||
span.finish(); | ||
finishRootSpan(this, utils_1.timestampInSeconds(), options.timeout); | ||
} | ||
else { | ||
var activeTransaction = ((_a = this.$root) === null || _a === void 0 ? void 0 : _a.$_sentryRootSpan) || getActiveTransaction(); | ||
if (activeTransaction) { | ||
this.$_sentrySpans[operation] = activeTransaction.startChild({ | ||
description: "Vue <" + name + ">", | ||
op: VUE_OP + "." + operation, | ||
}); | ||
} | ||
} | ||
}; | ||
_loop_2(internalHook); | ||
} | ||
@@ -97,0 +105,0 @@ } |
@@ -50,46 +50,54 @@ import { __values } from "tslib"; | ||
} | ||
var _loop_2 = function (internalHook) { | ||
mixins[internalHook] = function () { | ||
var _a; | ||
var isRoot = this.$root === this; | ||
if (isRoot) { | ||
var activeTransaction = getActiveTransaction(); | ||
if (activeTransaction) { | ||
this.$_sentryRootSpan = | ||
this.$_sentryRootSpan || | ||
activeTransaction.startChild({ | ||
description: 'Application Render', | ||
op: VUE_OP, | ||
}); | ||
} | ||
} | ||
// Skip components that we don't want to track to minimize the noise and give a more granular control to the user | ||
var name = formatComponentName(this, false); | ||
var shouldTrack = Array.isArray(options.trackComponents) | ||
? options.trackComponents.includes(name) | ||
: options.trackComponents; | ||
// We always want to track root component | ||
if (!isRoot && !shouldTrack) { | ||
return; | ||
} | ||
this.$_sentrySpans = this.$_sentrySpans || {}; | ||
// Start a new span if current hook is a 'before' hook. | ||
// Otherwise, retrieve the current span and finish it. | ||
if (internalHook == internalHooks[0]) { | ||
var activeTransaction = ((_a = this.$root) === null || _a === void 0 ? void 0 : _a.$_sentryRootSpan) || getActiveTransaction(); | ||
if (activeTransaction) { | ||
this.$_sentrySpans[operation] = activeTransaction.startChild({ | ||
description: "Vue <" + name + ">", | ||
op: VUE_OP + "." + operation, | ||
}); | ||
} | ||
} | ||
else { | ||
// The span should already be added via the first handler call (in the 'before' hook) | ||
var span = this.$_sentrySpans[operation]; | ||
// The before hook did not start the tracking span, so the span was not added. | ||
// This is probably because it happened before there is an active transaction | ||
if (!span) | ||
return; | ||
span.finish(); | ||
finishRootSpan(this, timestampInSeconds(), options.timeout); | ||
} | ||
}; | ||
}; | ||
try { | ||
for (var internalHooks_1 = (e_2 = void 0, __values(internalHooks)), internalHooks_1_1 = internalHooks_1.next(); !internalHooks_1_1.done; internalHooks_1_1 = internalHooks_1.next()) { | ||
var internalHook = internalHooks_1_1.value; | ||
mixins[internalHook] = function () { | ||
var _a; | ||
var isRoot = this.$root === this; | ||
if (isRoot) { | ||
var activeTransaction = getActiveTransaction(); | ||
if (activeTransaction) { | ||
this.$_sentryRootSpan = | ||
this.$_sentryRootSpan || | ||
activeTransaction.startChild({ | ||
description: 'Application Render', | ||
op: VUE_OP, | ||
}); | ||
} | ||
} | ||
// Skip components that we don't want to track to minimize the noise and give a more granular control to the user | ||
var name = formatComponentName(this, false); | ||
var shouldTrack = Array.isArray(options.trackComponents) | ||
? options.trackComponents.includes(name) | ||
: options.trackComponents; | ||
// We always want to track root component | ||
if (!isRoot && !shouldTrack) { | ||
return; | ||
} | ||
this.$_sentrySpans = this.$_sentrySpans || {}; | ||
// On the first handler call (before), it'll be undefined, as `$once` will add it in the future. | ||
// However, on the second call (after), it'll be already in place. | ||
var span = this.$_sentrySpans[operation]; | ||
if (span) { | ||
span.finish(); | ||
finishRootSpan(this, timestampInSeconds(), options.timeout); | ||
} | ||
else { | ||
var activeTransaction = ((_a = this.$root) === null || _a === void 0 ? void 0 : _a.$_sentryRootSpan) || getActiveTransaction(); | ||
if (activeTransaction) { | ||
this.$_sentrySpans[operation] = activeTransaction.startChild({ | ||
description: "Vue <" + name + ">", | ||
op: VUE_OP + "." + operation, | ||
}); | ||
} | ||
} | ||
}; | ||
_loop_2(internalHook); | ||
} | ||
@@ -96,0 +104,0 @@ } |
{ | ||
"name": "@sentry/vue", | ||
"version": "6.17.0", | ||
"version": "6.17.1", | ||
"description": "Official Sentry SDK for Vue.js", | ||
@@ -19,7 +19,7 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/browser": "6.17.0", | ||
"@sentry/core": "6.17.0", | ||
"@sentry/minimal": "6.17.0", | ||
"@sentry/types": "6.17.0", | ||
"@sentry/utils": "6.17.0", | ||
"@sentry/browser": "6.17.1", | ||
"@sentry/core": "6.17.1", | ||
"@sentry/minimal": "6.17.1", | ||
"@sentry/types": "6.17.1", | ||
"@sentry/utils": "6.17.1", | ||
"tslib": "^1.9.3" | ||
@@ -26,0 +26,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
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
1341669
8571
+ Added@sentry/browser@6.17.1(transitive)
+ Added@sentry/core@6.17.1(transitive)
+ Added@sentry/hub@6.17.1(transitive)
+ Added@sentry/minimal@6.17.1(transitive)
+ Added@sentry/types@6.17.1(transitive)
+ Added@sentry/utils@6.17.1(transitive)
- Removed@sentry/browser@6.17.0(transitive)
- Removed@sentry/core@6.17.0(transitive)
- Removed@sentry/hub@6.17.0(transitive)
- Removed@sentry/minimal@6.17.0(transitive)
- Removed@sentry/types@6.17.0(transitive)
- Removed@sentry/utils@6.17.0(transitive)
Updated@sentry/browser@6.17.1
Updated@sentry/core@6.17.1
Updated@sentry/minimal@6.17.1
Updated@sentry/types@6.17.1
Updated@sentry/utils@6.17.1