New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/tracing

Package Overview
Dependencies
Maintainers
12
Versions
318
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/tracing - npm Package Compare versions

Comparing version 7.24.1 to 7.24.2

3

cjs/browser/browsertracing.js

@@ -68,4 +68,3 @@ var {

const { _metricOptions } = this.options;
index.startTrackingWebVitals(_metricOptions && _metricOptions._reportAllChanges);
index.startTrackingWebVitals();
if (_optionalChain([this, 'access', _2 => _2.options, 'access', _3 => _3._experiments, 'optionalAccess', _4 => _4.enableLongTask])) {

@@ -72,0 +71,0 @@ index.startTrackingLongTasks();

@@ -30,3 +30,3 @@ var {

*/
function startTrackingWebVitals(reportAllChanges = false) {
function startTrackingWebVitals() {
const performance = getBrowserPerformanceAPI();

@@ -38,3 +38,3 @@ if (performance && utils.browserPerformanceTimeOrigin) {

_trackCLS();
_trackLCP(reportAllChanges);
_trackLCP();
_trackFID();

@@ -87,16 +87,13 @@ }

/** Starts tracking the Largest Contentful Paint on the current page. */
function _trackLCP(reportAllChanges) {
getLCP.onLCP(
metric => {
const entry = metric.entries.pop();
if (!entry) {
return;
}
function _trackLCP() {
getLCP.onLCP(metric => {
const entry = metric.entries.pop();
if (!entry) {
return;
}
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('[Measurements] Adding LCP');
_measurements['lcp'] = { value: metric.value, unit: 'millisecond' };
_lcpEntry = entry ;
},
{ reportAllChanges },
);
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('[Measurements] Adding LCP');
_measurements['lcp'] = { value: metric.value, unit: 'millisecond' };
_lcpEntry = entry ;
});
}

@@ -103,0 +100,0 @@

@@ -45,3 +45,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

*/
const onCLS = (onReport, opts = {}) => {
const onCLS = (onReport) => {
const metric = initMetric.initMetric('CLS', 0);

@@ -92,3 +92,3 @@ let report;

if (po) {
report = bindReporter.bindReporter(onReport, metric, opts.reportAllChanges);
report = bindReporter.bindReporter(onReport, metric);

@@ -95,0 +95,0 @@ onHidden.onHidden(() => {

@@ -34,3 +34,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

*/
const onFID = (onReport, opts = {}) => {
const onFID = (onReport) => {
const visibilityWatcher = getVisibilityWatcher.getVisibilityWatcher();

@@ -55,3 +55,3 @@ const metric = initMetric.initMetric('FID');

const po = observe.observe('first-input', handleEntries);
report = bindReporter.bindReporter(onReport, metric, opts.reportAllChanges);
report = bindReporter.bindReporter(onReport, metric);

@@ -58,0 +58,0 @@ if (po) {

@@ -33,9 +33,4 @@ Object.defineProperty(exports, '__esModule', { value: true });

* value). The reported value is a `DOMHighResTimeStamp`.
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called any time a new `largest-contentful-paint`
* performance entry is dispatched, or once the final value of the metric has
* been determined.
*/
const onLCP = (onReport, opts = {}) => {
const onLCP = (onReport) => {
const visibilityWatcher = getVisibilityWatcher.getVisibilityWatcher();

@@ -66,3 +61,3 @@ const metric = initMetric.initMetric('LCP');

if (po) {
report = bindReporter.bindReporter(onReport, metric, opts.reportAllChanges);
report = bindReporter.bindReporter(onReport, metric);

@@ -69,0 +64,0 @@ const stopListening = () => {

@@ -26,2 +26,7 @@ var {

setupOnce(_, getCurrentHub) {
if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('Apollo Integration is skipped because of instrumenter configuration.');
return;
}
const pkg = utils.loadModule

@@ -36,7 +41,2 @@

if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('Apollo Integration is skipped because of instrumenter configuration.');
return;
}
/**

@@ -43,0 +43,0 @@ * Iterate over resolvers of the ApolloServer instance before schemas are constructed.

@@ -26,2 +26,7 @@ var {

setupOnce(_, getCurrentHub) {
if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('GraphQL Integration is skipped because of instrumenter configuration.');
return;
}
const pkg = utils.loadModule

@@ -36,7 +41,2 @@

if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('GraphQL Integration is skipped because of instrumenter configuration.');
return;
}
utils.fill(pkg, 'execute', function (orig) {

@@ -43,0 +43,0 @@ return function ( ...args) {

@@ -110,2 +110,7 @@ var {

setupOnce(_, getCurrentHub) {
if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('Mongo Integration is skipped because of instrumenter configuration.');
return;
}
const moduleName = this._useMongoose ? 'mongoose' : 'mongodb';

@@ -119,7 +124,2 @@ const pkg = utils.loadModule(moduleName);

if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('Mongo Integration is skipped because of instrumenter configuration.');
return;
}
this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub);

@@ -126,0 +126,0 @@ }

@@ -26,2 +26,7 @@ var {

setupOnce(_, getCurrentHub) {
if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('Mysql Integration is skipped because of instrumenter configuration.');
return;
}
const pkg = utils.loadModule('mysql/lib/Connection.js');

@@ -34,7 +39,2 @@

if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('Mysql Integration is skipped because of instrumenter configuration.');
return;
}
// The original function will have one of these signatures:

@@ -41,0 +41,0 @@ // function (callback) => void

@@ -30,2 +30,7 @@ var {

setupOnce(_, getCurrentHub) {
if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('Postgres Integration is skipped because of instrumenter configuration.');
return;
}
const pkg = utils.loadModule('pg');

@@ -38,7 +43,2 @@

if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('Postgres Integration is skipped because of instrumenter configuration.');
return;
}
if (this._usePgNative && !_optionalChain([pkg, 'access', _2 => _2.native, 'optionalAccess', _3 => _3.Client])) {

@@ -45,0 +45,0 @@ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.error("Postgres Integration was unable to access 'pg-native' bindings.");

@@ -63,4 +63,3 @@ import { _optionalChain } from '@sentry/utils/esm/buildPolyfills';

const { _metricOptions } = this.options;
startTrackingWebVitals(_metricOptions && _metricOptions._reportAllChanges);
startTrackingWebVitals();
if (_optionalChain([this, 'access', _2 => _2.options, 'access', _3 => _3._experiments, 'optionalAccess', _4 => _4.enableLongTask])) {

@@ -67,0 +66,0 @@ startTrackingLongTasks();

@@ -25,3 +25,3 @@ import { _nullishCoalesce } from '@sentry/utils/esm/buildPolyfills';

*/
function startTrackingWebVitals(reportAllChanges = false) {
function startTrackingWebVitals() {
const performance = getBrowserPerformanceAPI();

@@ -33,3 +33,3 @@ if (performance && browserPerformanceTimeOrigin) {

_trackCLS();
_trackLCP(reportAllChanges);
_trackLCP();
_trackFID();

@@ -82,16 +82,13 @@ }

/** Starts tracking the Largest Contentful Paint on the current page. */
function _trackLCP(reportAllChanges) {
onLCP(
metric => {
const entry = metric.entries.pop();
if (!entry) {
return;
}
function _trackLCP() {
onLCP(metric => {
const entry = metric.entries.pop();
if (!entry) {
return;
}
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding LCP');
_measurements['lcp'] = { value: metric.value, unit: 'millisecond' };
_lcpEntry = entry ;
},
{ reportAllChanges },
);
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding LCP');
_measurements['lcp'] = { value: metric.value, unit: 'millisecond' };
_lcpEntry = entry ;
});
}

@@ -98,0 +95,0 @@

@@ -43,3 +43,3 @@ import { bindReporter } from './lib/bindReporter.js';

*/
const onCLS = (onReport, opts = {}) => {
const onCLS = (onReport) => {
const metric = initMetric('CLS', 0);

@@ -90,3 +90,3 @@ let report;

if (po) {
report = bindReporter(onReport, metric, opts.reportAllChanges);
report = bindReporter(onReport, metric);

@@ -93,0 +93,0 @@ onHidden(() => {

@@ -32,3 +32,3 @@ import { bindReporter } from './lib/bindReporter.js';

*/
const onFID = (onReport, opts = {}) => {
const onFID = (onReport) => {
const visibilityWatcher = getVisibilityWatcher();

@@ -53,3 +53,3 @@ const metric = initMetric('FID');

const po = observe('first-input', handleEntries);
report = bindReporter(onReport, metric, opts.reportAllChanges);
report = bindReporter(onReport, metric);

@@ -56,0 +56,0 @@ if (po) {

@@ -31,9 +31,4 @@ import { bindReporter } from './lib/bindReporter.js';

* value). The reported value is a `DOMHighResTimeStamp`.
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called any time a new `largest-contentful-paint`
* performance entry is dispatched, or once the final value of the metric has
* been determined.
*/
const onLCP = (onReport, opts = {}) => {
const onLCP = (onReport) => {
const visibilityWatcher = getVisibilityWatcher();

@@ -64,3 +59,3 @@ const metric = initMetric('LCP');

if (po) {
report = bindReporter(onReport, metric, opts.reportAllChanges);
report = bindReporter(onReport, metric);

@@ -67,0 +62,0 @@ const stopListening = () => {

import { _optionalChain } from '@sentry/utils/esm/buildPolyfills';
import { loadModule, logger, fill, arrayify, isThenable } from '@sentry/utils';
import { logger, loadModule, fill, arrayify, isThenable } from '@sentry/utils';
import { shouldDisableAutoInstrumentation } from './utils/node-utils.js';

@@ -21,2 +21,7 @@

setupOnce(_, getCurrentHub) {
if (shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Apollo Integration is skipped because of instrumenter configuration.');
return;
}
const pkg = loadModule

@@ -31,7 +36,2 @@

if (shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Apollo Integration is skipped because of instrumenter configuration.');
return;
}
/**

@@ -38,0 +38,0 @@ * Iterate over resolvers of the ApolloServer instance before schemas are constructed.

import { _optionalChain } from '@sentry/utils/esm/buildPolyfills';
import { loadModule, logger, fill, isThenable } from '@sentry/utils';
import { logger, loadModule, fill, isThenable } from '@sentry/utils';
import { shouldDisableAutoInstrumentation } from './utils/node-utils.js';

@@ -21,2 +21,7 @@

setupOnce(_, getCurrentHub) {
if (shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('GraphQL Integration is skipped because of instrumenter configuration.');
return;
}
const pkg = loadModule

@@ -31,7 +36,2 @@

if (shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('GraphQL Integration is skipped because of instrumenter configuration.');
return;
}
fill(pkg, 'execute', function (orig) {

@@ -38,0 +38,0 @@ return function ( ...args) {

import { _optionalChain } from '@sentry/utils/esm/buildPolyfills';
import { loadModule, logger, fill, isThenable } from '@sentry/utils';
import { logger, loadModule, fill, isThenable } from '@sentry/utils';
import { shouldDisableAutoInstrumentation } from './utils/node-utils.js';

@@ -105,2 +105,7 @@

setupOnce(_, getCurrentHub) {
if (shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Mongo Integration is skipped because of instrumenter configuration.');
return;
}
const moduleName = this._useMongoose ? 'mongoose' : 'mongodb';

@@ -114,7 +119,2 @@ const pkg = loadModule(moduleName);

if (shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Mongo Integration is skipped because of instrumenter configuration.');
return;
}
this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub);

@@ -121,0 +121,0 @@ }

import { _optionalChain } from '@sentry/utils/esm/buildPolyfills';
import { loadModule, logger, fill } from '@sentry/utils';
import { logger, loadModule, fill } from '@sentry/utils';
import { shouldDisableAutoInstrumentation } from './utils/node-utils.js';

@@ -21,2 +21,7 @@

setupOnce(_, getCurrentHub) {
if (shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Mysql Integration is skipped because of instrumenter configuration.');
return;
}
const pkg = loadModule('mysql/lib/Connection.js');

@@ -29,7 +34,2 @@

if (shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Mysql Integration is skipped because of instrumenter configuration.');
return;
}
// The original function will have one of these signatures:

@@ -36,0 +36,0 @@ // function (callback) => void

import { _optionalChain } from '@sentry/utils/esm/buildPolyfills';
import { loadModule, logger, fill, isThenable } from '@sentry/utils';
import { logger, loadModule, fill, isThenable } from '@sentry/utils';
import { shouldDisableAutoInstrumentation } from './utils/node-utils.js';

@@ -25,2 +25,7 @@

setupOnce(_, getCurrentHub) {
if (shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Postgres Integration is skipped because of instrumenter configuration.');
return;
}
const pkg = loadModule('pg');

@@ -33,7 +38,2 @@

if (shouldDisableAutoInstrumentation(getCurrentHub)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Postgres Integration is skipped because of instrumenter configuration.');
return;
}
if (this._usePgNative && !_optionalChain([pkg, 'access', _2 => _2.native, 'optionalAccess', _3 => _3.Client])) {

@@ -40,0 +40,0 @@ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error("Postgres Integration was unable to access 'pg-native' bindings.");

{
"name": "@sentry/tracing",
"version": "7.24.1",
"version": "7.24.2",
"description": "Extensions for Sentry AM",

@@ -19,9 +19,9 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/core": "7.24.1",
"@sentry/types": "7.24.1",
"@sentry/utils": "7.24.1",
"@sentry/core": "7.24.2",
"@sentry/types": "7.24.2",
"@sentry/utils": "7.24.2",
"tslib": "^1.9.3"
},
"devDependencies": {
"@sentry/browser": "7.24.1",
"@sentry/browser": "7.24.2",
"@types/express": "^4.17.14"

@@ -28,0 +28,0 @@ },

@@ -62,2 +62,5 @@ import { Hub } from '@sentry/core';

_metricOptions?: Partial<{
/**
* @deprecated This property no longer has any effect and will be removed in v8.
*/
_reportAllChanges: boolean;

@@ -64,0 +67,0 @@ }>;

@@ -5,3 +5,3 @@ import { Transaction } from '../../transaction';

*/
export declare function startTrackingWebVitals(reportAllChanges?: boolean): void;
export declare function startTrackingWebVitals(): void;
/**

@@ -8,0 +8,0 @@ * Start tracking long tasks.

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

import { ReportCallback, ReportOpts } from './types';
import { ReportCallback } from './types';
/**

@@ -23,3 +23,3 @@ * Calculates the [CLS](https://web.dev/cls/) value for the current page and

*/
export declare const onCLS: (onReport: ReportCallback, opts?: ReportOpts) => void;
export declare const onCLS: (onReport: ReportCallback) => void;
//# sourceMappingURL=getCLS.d.ts.map

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

import { ReportCallback, ReportOpts } from './types';
import { ReportCallback } from './types';
/**

@@ -11,3 +11,3 @@ * Calculates the [FID](https://web.dev/fid/) value for the current page and

*/
export declare const onFID: (onReport: ReportCallback, opts?: ReportOpts) => void;
export declare const onFID: (onReport: ReportCallback) => void;
//# sourceMappingURL=getFID.d.ts.map

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

import { ReportCallback, ReportOpts } from './types';
import { ReportCallback } from './types';
/**

@@ -7,9 +7,4 @@ * Calculates the [LCP](https://web.dev/lcp/) value for the current page and

* value). The reported value is a `DOMHighResTimeStamp`.
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called any time a new `largest-contentful-paint`
* performance entry is dispatched, or once the final value of the metric has
* been determined.
*/
export declare const onLCP: (onReport: ReportCallback, opts?: ReportOpts) => void;
export declare const onLCP: (onReport: ReportCallback) => void;
//# sourceMappingURL=getLCP.d.ts.map

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

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