@sentry/tracing
Advanced tools
Comparing version 6.3.6 to 6.4.0
@@ -22,4 +22,2 @@ import { SpanContext } from '@sentry/types'; | ||
private _trackFID; | ||
/** Starts tracking the Time to First Byte on the current page. */ | ||
private _trackTTFB; | ||
} | ||
@@ -26,0 +24,0 @@ export interface ResourceEntry extends Record<string, unknown> { |
@@ -8,3 +8,2 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
var getLCP_1 = require("./web-vitals/getLCP"); | ||
var getTTFB_1 = require("./web-vitals/getTTFB"); | ||
var getFirstHidden_1 = require("./web-vitals/lib/getFirstHidden"); | ||
@@ -24,3 +23,2 @@ var global = utils_1.getGlobalObject(); | ||
this._trackFID(); | ||
this._trackTTFB(); | ||
} | ||
@@ -52,2 +50,4 @@ } | ||
var tracingInitMarkStartTime; | ||
var responseStartTimestamp; | ||
var requestStartTimestamp; | ||
global.performance | ||
@@ -63,5 +63,8 @@ .getEntries() | ||
switch (entry.entryType) { | ||
case 'navigation': | ||
case 'navigation': { | ||
addNavigationSpans(transaction, entry, timeOrigin); | ||
responseStartTimestamp = timeOrigin + utils_2.msToSec(entry.responseStart); | ||
requestStartTimestamp = timeOrigin + utils_2.msToSec(entry.requestStart); | ||
break; | ||
} | ||
case 'mark': | ||
@@ -117,3 +120,14 @@ case 'paint': | ||
var timeOrigin_1 = utils_2.msToSec(utils_1.browserPerformanceTimeOrigin); | ||
['fcp', 'fp', 'lcp', 'ttfb'].forEach(function (name) { | ||
// Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the | ||
// start of the response in milliseconds | ||
if (typeof responseStartTimestamp === 'number') { | ||
utils_1.logger.log('[Measurements] Adding TTFB'); | ||
this._measurements['ttfb'] = { value: (responseStartTimestamp - transaction.startTimestamp) * 1000 }; | ||
if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) { | ||
// Capture the time spent making the request and receiving the first byte of the response. | ||
// This is the time between the start of the request and the start of the response in milliseconds. | ||
this._measurements['ttfb.requestTime'] = { value: (responseStartTimestamp - requestStartTimestamp) * 1000 }; | ||
} | ||
} | ||
['fcp', 'fp', 'lcp'].forEach(function (name) { | ||
if (!_this._measurements[name] || timeOrigin_1 >= transaction.startTimestamp) { | ||
@@ -234,18 +248,2 @@ return; | ||
}; | ||
/** Starts tracking the Time to First Byte on the current page. */ | ||
MetricsInstrumentation.prototype._trackTTFB = function () { | ||
var _this = this; | ||
getTTFB_1.getTTFB(function (metric) { | ||
var _a; | ||
var entry = metric.entries.pop(); | ||
if (!entry) { | ||
return; | ||
} | ||
utils_1.logger.log('[Measurements] Adding TTFB'); | ||
_this._measurements['ttfb'] = { value: metric.value }; | ||
// Capture the time spent making the request and receiving the first byte of the response | ||
var requestTime = metric.value - (_a = metric.entries[0], (_a !== null && _a !== void 0 ? _a : entry)).requestStart; | ||
_this._measurements['ttfb.requestTime'] = { value: requestTime }; | ||
}); | ||
}; | ||
return MetricsInstrumentation; | ||
@@ -252,0 +250,0 @@ }()); |
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var hub_1 = require("@sentry/hub"); | ||
var utils_1 = require("@sentry/utils"); | ||
@@ -61,7 +60,3 @@ var spanstatus_1 = require("../spanstatus"); | ||
function fetchCallback(handlerData, shouldCreateSpan, spans) { | ||
var _a; | ||
var currentClientOptions = (_a = hub_1.getCurrentHub() | ||
.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions(); | ||
if (!(currentClientOptions && utils_2.hasTracingEnabled(currentClientOptions)) || | ||
!(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) { | ||
if (!utils_2.hasTracingEnabled() || !(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) { | ||
return; | ||
@@ -126,8 +121,5 @@ } | ||
function xhrCallback(handlerData, shouldCreateSpan, spans) { | ||
var _a; | ||
var currentClientOptions = (_a = hub_1.getCurrentHub() | ||
.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions(); | ||
if (!(currentClientOptions && utils_2.hasTracingEnabled(currentClientOptions)) || | ||
!(handlerData.xhr && handlerData.xhr.__sentry_xhr__ && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url)) || | ||
handlerData.xhr.__sentry_own_request__) { | ||
var _a, _b; | ||
if (!utils_2.hasTracingEnabled() || ((_a = handlerData.xhr) === null || _a === void 0 ? void 0 : _a.__sentry_own_request__) || | ||
!(((_b = handlerData.xhr) === null || _b === void 0 ? void 0 : _b.__sentry_xhr__) && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url))) { | ||
return; | ||
@@ -134,0 +126,0 @@ } |
@@ -37,3 +37,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
// nothing to do if tracing is not enabled | ||
if (!utils_2.hasTracingEnabled(options)) { | ||
if (!utils_2.hasTracingEnabled()) { | ||
transaction.sampled = false; | ||
@@ -165,13 +165,55 @@ return transaction; | ||
var carrier = hub_1.getMainCarrier(); | ||
if (carrier.__SENTRY__) { | ||
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; | ||
if (!carrier.__SENTRY__.extensions.startTransaction) { | ||
carrier.__SENTRY__.extensions.startTransaction = _startTransaction; | ||
if (!carrier.__SENTRY__) { | ||
return; | ||
} | ||
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; | ||
if (!carrier.__SENTRY__.extensions.startTransaction) { | ||
carrier.__SENTRY__.extensions.startTransaction = _startTransaction; | ||
} | ||
if (!carrier.__SENTRY__.extensions.traceHeaders) { | ||
carrier.__SENTRY__.extensions.traceHeaders = traceHeaders; | ||
} | ||
} | ||
exports._addTracingExtensions = _addTracingExtensions; | ||
/** | ||
* @private | ||
*/ | ||
function _autoloadDatabaseIntegrations() { | ||
var carrier = hub_1.getMainCarrier(); | ||
if (!carrier.__SENTRY__) { | ||
return; | ||
} | ||
var packageToIntegrationMapping = { | ||
mongodb: function () { | ||
var integration = utils_1.dynamicRequire(module, './integrations/mongo'); | ||
return new integration.Mongo(); | ||
}, | ||
mongoose: function () { | ||
var integration = utils_1.dynamicRequire(module, './integrations/mongo'); | ||
return new integration.Mongo({ mongoose: true }); | ||
}, | ||
mysql: function () { | ||
var integration = utils_1.dynamicRequire(module, './integrations/mysql'); | ||
return new integration.Mysql(); | ||
}, | ||
pg: function () { | ||
var integration = utils_1.dynamicRequire(module, './integrations/postgres'); | ||
return new integration.Postgres(); | ||
}, | ||
}; | ||
var mappedPackages = Object.keys(packageToIntegrationMapping) | ||
.filter(function (moduleName) { return !!utils_1.loadModule(moduleName); }) | ||
.map(function (pkg) { | ||
try { | ||
return packageToIntegrationMapping[pkg](); | ||
} | ||
if (!carrier.__SENTRY__.extensions.traceHeaders) { | ||
carrier.__SENTRY__.extensions.traceHeaders = traceHeaders; | ||
catch (e) { | ||
return undefined; | ||
} | ||
}) | ||
.filter(function (p) { return p; }); | ||
if (mappedPackages.length > 0) { | ||
carrier.__SENTRY__.integrations = tslib_1.__spread((carrier.__SENTRY__.integrations || []), mappedPackages); | ||
} | ||
} | ||
exports._addTracingExtensions = _addTracingExtensions; | ||
/** | ||
@@ -182,2 +224,6 @@ * This patches the global object and injects the Tracing extensions methods | ||
_addTracingExtensions(); | ||
// Detect and automatically load specified integrations. | ||
if (utils_1.isNodeEnv()) { | ||
_autoloadDatabaseIntegrations(); | ||
} | ||
// If an error happens globally, we should make sure transaction status is set to error. | ||
@@ -184,0 +230,0 @@ errors_1.registerErrorInstrumentation(); |
@@ -88,13 +88,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
Mongo.prototype.setupOnce = function (_, getCurrentHub) { | ||
var collection; | ||
var moduleName = this._useMongoose ? 'mongoose' : 'mongodb'; | ||
try { | ||
var mongodbModule = utils_1.dynamicRequire(module, moduleName); | ||
collection = mongodbModule.Collection; | ||
} | ||
catch (e) { | ||
var pkg = utils_1.loadModule(moduleName); | ||
if (!pkg) { | ||
utils_1.logger.error("Mongo Integration was unable to require `" + moduleName + "` package."); | ||
return; | ||
} | ||
this._instrumentOperations(collection, this._operations, getCurrentHub); | ||
this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub); | ||
}; | ||
@@ -101,0 +97,0 @@ /** |
@@ -15,8 +15,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
Mysql.prototype.setupOnce = function (_, getCurrentHub) { | ||
var connection; | ||
try { | ||
// Unfortunatelly mysql is using some custom loading system and `Connection` is not exported directly. | ||
connection = utils_1.dynamicRequire(module, 'mysql/lib/Connection.js'); | ||
} | ||
catch (e) { | ||
var pkg = utils_1.loadModule('mysql/lib/Connection.js'); | ||
if (!pkg) { | ||
utils_1.logger.error('Mysql Integration was unable to require `mysql` package.'); | ||
@@ -29,3 +25,3 @@ return; | ||
// function (options, values, callback) => void | ||
utils_1.fill(connection, 'createQuery', function (orig) { | ||
utils_1.fill(pkg, 'createQuery', function (orig) { | ||
return function (options, values, callback) { | ||
@@ -32,0 +28,0 @@ var _a, _b; |
@@ -15,8 +15,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
Postgres.prototype.setupOnce = function (_, getCurrentHub) { | ||
var client; | ||
try { | ||
var pgModule = utils_1.dynamicRequire(module, 'pg'); | ||
client = pgModule.Client; | ||
} | ||
catch (e) { | ||
var pkg = utils_1.loadModule('pg'); | ||
if (!pkg) { | ||
utils_1.logger.error('Postgres Integration was unable to require `pg` package.'); | ||
@@ -31,3 +27,3 @@ return; | ||
*/ | ||
utils_1.fill(client.prototype, 'query', function (orig) { | ||
utils_1.fill(pkg.Client.prototype, 'query', function (orig) { | ||
return function (config, values, callback) { | ||
@@ -34,0 +30,0 @@ var _a, _b; |
@@ -9,3 +9,3 @@ import { Hub } from '@sentry/hub'; | ||
*/ | ||
export declare function hasTracingEnabled(options: Options): boolean; | ||
export declare function hasTracingEnabled(options?: Options | undefined): boolean; | ||
/** | ||
@@ -12,0 +12,0 @@ * Extract transaction context data from a `sentry-trace` header. |
@@ -14,2 +14,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
function hasTracingEnabled(options) { | ||
if (options === void 0) { options = (_a = hub_1.getCurrentHub() | ||
.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions(); } | ||
var _a; | ||
if (!options) { | ||
return false; | ||
} | ||
return 'tracesSampleRate' in options || 'tracesSampler' in options; | ||
@@ -16,0 +22,0 @@ } |
@@ -22,4 +22,2 @@ import { SpanContext } from '@sentry/types'; | ||
private _trackFID; | ||
/** Starts tracking the Time to First Byte on the current page. */ | ||
private _trackTTFB; | ||
} | ||
@@ -26,0 +24,0 @@ export interface ResourceEntry extends Record<string, unknown> { |
@@ -7,3 +7,2 @@ import { __assign, __rest } from "tslib"; | ||
import { getLCP } from './web-vitals/getLCP'; | ||
import { getTTFB } from './web-vitals/getTTFB'; | ||
import { getFirstHidden } from './web-vitals/lib/getFirstHidden'; | ||
@@ -23,3 +22,2 @@ var global = getGlobalObject(); | ||
this._trackFID(); | ||
this._trackTTFB(); | ||
} | ||
@@ -51,2 +49,4 @@ } | ||
var tracingInitMarkStartTime; | ||
var responseStartTimestamp; | ||
var requestStartTimestamp; | ||
global.performance | ||
@@ -62,5 +62,8 @@ .getEntries() | ||
switch (entry.entryType) { | ||
case 'navigation': | ||
case 'navigation': { | ||
addNavigationSpans(transaction, entry, timeOrigin); | ||
responseStartTimestamp = timeOrigin + msToSec(entry.responseStart); | ||
requestStartTimestamp = timeOrigin + msToSec(entry.requestStart); | ||
break; | ||
} | ||
case 'mark': | ||
@@ -116,3 +119,14 @@ case 'paint': | ||
var timeOrigin_1 = msToSec(browserPerformanceTimeOrigin); | ||
['fcp', 'fp', 'lcp', 'ttfb'].forEach(function (name) { | ||
// Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the | ||
// start of the response in milliseconds | ||
if (typeof responseStartTimestamp === 'number') { | ||
logger.log('[Measurements] Adding TTFB'); | ||
this._measurements['ttfb'] = { value: (responseStartTimestamp - transaction.startTimestamp) * 1000 }; | ||
if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) { | ||
// Capture the time spent making the request and receiving the first byte of the response. | ||
// This is the time between the start of the request and the start of the response in milliseconds. | ||
this._measurements['ttfb.requestTime'] = { value: (responseStartTimestamp - requestStartTimestamp) * 1000 }; | ||
} | ||
} | ||
['fcp', 'fp', 'lcp'].forEach(function (name) { | ||
if (!_this._measurements[name] || timeOrigin_1 >= transaction.startTimestamp) { | ||
@@ -233,18 +247,2 @@ return; | ||
}; | ||
/** Starts tracking the Time to First Byte on the current page. */ | ||
MetricsInstrumentation.prototype._trackTTFB = function () { | ||
var _this = this; | ||
getTTFB(function (metric) { | ||
var _a; | ||
var entry = metric.entries.pop(); | ||
if (!entry) { | ||
return; | ||
} | ||
logger.log('[Measurements] Adding TTFB'); | ||
_this._measurements['ttfb'] = { value: metric.value }; | ||
// Capture the time spent making the request and receiving the first byte of the response | ||
var requestTime = metric.value - (_a = metric.entries[0], (_a !== null && _a !== void 0 ? _a : entry)).requestStart; | ||
_this._measurements['ttfb.requestTime'] = { value: requestTime }; | ||
}); | ||
}; | ||
return MetricsInstrumentation; | ||
@@ -251,0 +249,0 @@ }()); |
import { __assign, __read, __spread } from "tslib"; | ||
import { getCurrentHub } from '@sentry/hub'; | ||
import { addInstrumentationHandler, isInstanceOf, isMatchingPattern } from '@sentry/utils'; | ||
@@ -59,7 +58,3 @@ import { SpanStatus } from '../spanstatus'; | ||
export function fetchCallback(handlerData, shouldCreateSpan, spans) { | ||
var _a; | ||
var currentClientOptions = (_a = getCurrentHub() | ||
.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions(); | ||
if (!(currentClientOptions && hasTracingEnabled(currentClientOptions)) || | ||
!(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) { | ||
if (!hasTracingEnabled() || !(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) { | ||
return; | ||
@@ -123,8 +118,5 @@ } | ||
export function xhrCallback(handlerData, shouldCreateSpan, spans) { | ||
var _a; | ||
var currentClientOptions = (_a = getCurrentHub() | ||
.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions(); | ||
if (!(currentClientOptions && hasTracingEnabled(currentClientOptions)) || | ||
!(handlerData.xhr && handlerData.xhr.__sentry_xhr__ && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url)) || | ||
handlerData.xhr.__sentry_own_request__) { | ||
var _a, _b; | ||
if (!hasTracingEnabled() || ((_a = handlerData.xhr) === null || _a === void 0 ? void 0 : _a.__sentry_own_request__) || | ||
!(((_b = handlerData.xhr) === null || _b === void 0 ? void 0 : _b.__sentry_xhr__) && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url))) { | ||
return; | ||
@@ -131,0 +123,0 @@ } |
@@ -1,5 +0,5 @@ | ||
import { __assign } from "tslib"; | ||
import { __assign, __read, __spread } from "tslib"; | ||
import { getMainCarrier } from '@sentry/hub'; | ||
import { TransactionSamplingMethod, } from '@sentry/types'; | ||
import { logger } from '@sentry/utils'; | ||
import { dynamicRequire, isNodeEnv, loadModule, logger } from '@sentry/utils'; | ||
import { registerErrorInstrumentation } from './errors'; | ||
@@ -36,3 +36,3 @@ import { IdleTransaction } from './idletransaction'; | ||
// nothing to do if tracing is not enabled | ||
if (!hasTracingEnabled(options)) { | ||
if (!hasTracingEnabled()) { | ||
transaction.sampled = false; | ||
@@ -163,10 +163,52 @@ return transaction; | ||
var carrier = getMainCarrier(); | ||
if (carrier.__SENTRY__) { | ||
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; | ||
if (!carrier.__SENTRY__.extensions.startTransaction) { | ||
carrier.__SENTRY__.extensions.startTransaction = _startTransaction; | ||
if (!carrier.__SENTRY__) { | ||
return; | ||
} | ||
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; | ||
if (!carrier.__SENTRY__.extensions.startTransaction) { | ||
carrier.__SENTRY__.extensions.startTransaction = _startTransaction; | ||
} | ||
if (!carrier.__SENTRY__.extensions.traceHeaders) { | ||
carrier.__SENTRY__.extensions.traceHeaders = traceHeaders; | ||
} | ||
} | ||
/** | ||
* @private | ||
*/ | ||
function _autoloadDatabaseIntegrations() { | ||
var carrier = getMainCarrier(); | ||
if (!carrier.__SENTRY__) { | ||
return; | ||
} | ||
var packageToIntegrationMapping = { | ||
mongodb: function () { | ||
var integration = dynamicRequire(module, './integrations/mongo'); | ||
return new integration.Mongo(); | ||
}, | ||
mongoose: function () { | ||
var integration = dynamicRequire(module, './integrations/mongo'); | ||
return new integration.Mongo({ mongoose: true }); | ||
}, | ||
mysql: function () { | ||
var integration = dynamicRequire(module, './integrations/mysql'); | ||
return new integration.Mysql(); | ||
}, | ||
pg: function () { | ||
var integration = dynamicRequire(module, './integrations/postgres'); | ||
return new integration.Postgres(); | ||
}, | ||
}; | ||
var mappedPackages = Object.keys(packageToIntegrationMapping) | ||
.filter(function (moduleName) { return !!loadModule(moduleName); }) | ||
.map(function (pkg) { | ||
try { | ||
return packageToIntegrationMapping[pkg](); | ||
} | ||
if (!carrier.__SENTRY__.extensions.traceHeaders) { | ||
carrier.__SENTRY__.extensions.traceHeaders = traceHeaders; | ||
catch (e) { | ||
return undefined; | ||
} | ||
}) | ||
.filter(function (p) { return p; }); | ||
if (mappedPackages.length > 0) { | ||
carrier.__SENTRY__.integrations = __spread((carrier.__SENTRY__.integrations || []), mappedPackages); | ||
} | ||
@@ -179,2 +221,6 @@ } | ||
_addTracingExtensions(); | ||
// Detect and automatically load specified integrations. | ||
if (isNodeEnv()) { | ||
_autoloadDatabaseIntegrations(); | ||
} | ||
// If an error happens globally, we should make sure transaction status is set to error. | ||
@@ -181,0 +227,0 @@ registerErrorInstrumentation(); |
import { __read, __spread } from "tslib"; | ||
import { dynamicRequire, fill, isThenable, logger } from '@sentry/utils'; | ||
import { fill, isThenable, loadModule, logger } from '@sentry/utils'; | ||
var OPERATIONS = [ | ||
@@ -87,13 +87,9 @@ 'aggregate', | ||
Mongo.prototype.setupOnce = function (_, getCurrentHub) { | ||
var collection; | ||
var moduleName = this._useMongoose ? 'mongoose' : 'mongodb'; | ||
try { | ||
var mongodbModule = dynamicRequire(module, moduleName); | ||
collection = mongodbModule.Collection; | ||
} | ||
catch (e) { | ||
var pkg = loadModule(moduleName); | ||
if (!pkg) { | ||
logger.error("Mongo Integration was unable to require `" + moduleName + "` package."); | ||
return; | ||
} | ||
this._instrumentOperations(collection, this._operations, getCurrentHub); | ||
this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub); | ||
}; | ||
@@ -100,0 +96,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { dynamicRequire, fill, logger } from '@sentry/utils'; | ||
import { fill, loadModule, logger } from '@sentry/utils'; | ||
/** Tracing integration for node-mysql package */ | ||
@@ -14,8 +14,4 @@ var Mysql = /** @class */ (function () { | ||
Mysql.prototype.setupOnce = function (_, getCurrentHub) { | ||
var connection; | ||
try { | ||
// Unfortunatelly mysql is using some custom loading system and `Connection` is not exported directly. | ||
connection = dynamicRequire(module, 'mysql/lib/Connection.js'); | ||
} | ||
catch (e) { | ||
var pkg = loadModule('mysql/lib/Connection.js'); | ||
if (!pkg) { | ||
logger.error('Mysql Integration was unable to require `mysql` package.'); | ||
@@ -28,3 +24,3 @@ return; | ||
// function (options, values, callback) => void | ||
fill(connection, 'createQuery', function (orig) { | ||
fill(pkg, 'createQuery', function (orig) { | ||
return function (options, values, callback) { | ||
@@ -31,0 +27,0 @@ var _a, _b; |
@@ -1,2 +0,2 @@ | ||
import { dynamicRequire, fill, logger } from '@sentry/utils'; | ||
import { fill, loadModule, logger } from '@sentry/utils'; | ||
/** Tracing integration for node-postgres package */ | ||
@@ -14,8 +14,4 @@ var Postgres = /** @class */ (function () { | ||
Postgres.prototype.setupOnce = function (_, getCurrentHub) { | ||
var client; | ||
try { | ||
var pgModule = dynamicRequire(module, 'pg'); | ||
client = pgModule.Client; | ||
} | ||
catch (e) { | ||
var pkg = loadModule('pg'); | ||
if (!pkg) { | ||
logger.error('Postgres Integration was unable to require `pg` package.'); | ||
@@ -30,3 +26,3 @@ return; | ||
*/ | ||
fill(client.prototype, 'query', function (orig) { | ||
fill(pkg.Client.prototype, 'query', function (orig) { | ||
return function (config, values, callback) { | ||
@@ -33,0 +29,0 @@ var _a, _b; |
@@ -9,3 +9,3 @@ import { Hub } from '@sentry/hub'; | ||
*/ | ||
export declare function hasTracingEnabled(options: Options): boolean; | ||
export declare function hasTracingEnabled(options?: Options | undefined): boolean; | ||
/** | ||
@@ -12,0 +12,0 @@ * Extract transaction context data from a `sentry-trace` header. |
@@ -13,2 +13,8 @@ import { getCurrentHub } from '@sentry/hub'; | ||
export function hasTracingEnabled(options) { | ||
if (options === void 0) { options = (_a = getCurrentHub() | ||
.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions(); } | ||
var _a; | ||
if (!options) { | ||
return false; | ||
} | ||
return 'tracesSampleRate' in options || 'tracesSampler' in options; | ||
@@ -15,0 +21,0 @@ } |
{ | ||
"name": "@sentry/tracing", | ||
"version": "6.3.6", | ||
"version": "6.4.0", | ||
"description": "Extensions for Sentry AM", | ||
@@ -19,11 +19,11 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/hub": "6.3.6", | ||
"@sentry/minimal": "6.3.6", | ||
"@sentry/types": "6.3.6", | ||
"@sentry/utils": "6.3.6", | ||
"@sentry/hub": "6.4.0", | ||
"@sentry/minimal": "6.4.0", | ||
"@sentry/types": "6.4.0", | ||
"@sentry/utils": "6.4.0", | ||
"tslib": "^1.9.3" | ||
}, | ||
"devDependencies": { | ||
"@sentry-internal/eslint-config-sdk": "6.3.6", | ||
"@sentry/browser": "6.3.6", | ||
"@sentry-internal/eslint-config-sdk": "6.4.0", | ||
"@sentry/browser": "6.4.0", | ||
"@types/express": "^4.17.1", | ||
@@ -30,0 +30,0 @@ "@types/jsdom": "^16.2.3", |
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
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
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
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
2200555
255
16188
+ Added@sentry/hub@6.4.0(transitive)
+ Added@sentry/minimal@6.4.0(transitive)
+ Added@sentry/types@6.4.0(transitive)
+ Added@sentry/utils@6.4.0(transitive)
- Removed@sentry/hub@6.3.6(transitive)
- Removed@sentry/minimal@6.3.6(transitive)
- Removed@sentry/types@6.3.6(transitive)
- Removed@sentry/utils@6.3.6(transitive)
Updated@sentry/hub@6.4.0
Updated@sentry/minimal@6.4.0
Updated@sentry/types@6.4.0
Updated@sentry/utils@6.4.0