Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/tracing

Package Overview
Dependencies
Maintainers
12
Versions
317
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 6.10.0-beta.2 to 6.10.0-beta.3

1

dist/browser/metrics.d.ts

@@ -10,3 +10,2 @@ import { SpanContext } from '@sentry/types';

private _clsEntry;
private _updatedClsEntry;
constructor();

@@ -13,0 +12,0 @@ /** Add performance related spans to a transaction */

@@ -8,3 +8,2 @@ Object.defineProperty(exports, "__esModule", { value: true });

var getLCP_1 = require("./web-vitals/getLCP");
var getUpdatedCLS_1 = require("./web-vitals/getUpdatedCLS");
var getVisibilityWatcher_1 = require("./web-vitals/lib/getVisibilityWatcher");

@@ -154,6 +153,6 @@ var global = utils_1.getGlobalObject();

}
// If FCP is not recorded we should not record the updated cls value
// If FCP is not recorded we should not record the cls value
// according to the new definition of CLS.
if (!('fcp' in this._measurements)) {
delete this._measurements['updated-cls'];
delete this._measurements.cls;
}

@@ -188,8 +187,2 @@ transaction.setMeasurements(this._measurements);

}
if (this._updatedClsEntry && this._updatedClsEntry.sources) {
utils_1.logger.log('[Measurements] Adding Updated CLS Data');
this._updatedClsEntry.sources.forEach(function (source, index) {
return transaction.setTag("updated-cls.source." + (index + 1), utils_1.htmlTreeAsString(source.node));
});
}
};

@@ -199,2 +192,5 @@ /** Starts tracking the Cumulative Layout Shift on the current page. */

var _this = this;
// See:
// https://web.dev/evolving-cls/
// https://web.dev/cls-web-tooling/
getCLS_1.getCLS(function (metric) {

@@ -209,14 +205,2 @@ var entry = metric.entries.pop();

});
// See:
// https://web.dev/evolving-cls/
// https://web.dev/cls-web-tooling/
getUpdatedCLS_1.getUpdatedCLS(function (metric) {
var entry = metric.entries.pop();
if (!entry) {
return;
}
utils_1.logger.log('[Measurements] Adding Updated CLS');
_this._measurements['updated-cls'] = { value: metric.value };
_this._updatedClsEntry = entry;
});
};

@@ -223,0 +207,0 @@ /**

4

dist/browser/request.js

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

description: handlerData.fetchData.method + " " + handlerData.fetchData.url,
op: 'http',
op: 'http.client',
});

@@ -144,3 +144,3 @@ handlerData.fetchData.__span = span.spanId;

description: xhr.method + " " + xhr.url,
op: 'http',
op: 'http.client',
});

@@ -147,0 +147,0 @@ handlerData.xhr.__sentry_xhr_span_id__ = span.spanId;

@@ -24,9 +24,33 @@ /*

var report;
var sessionValue = 0;
var sessionEntries = [];
var entryHandler = function (entry) {
// Only count layout shifts without recent user input.
// TODO: Figure out why entry can be undefined
if (entry && !entry.hadRecentInput) {
metric.value += entry.value;
metric.entries.push(entry);
if (report) {
report();
var firstSessionEntry = sessionEntries[0];
var lastSessionEntry = sessionEntries[sessionEntries.length - 1];
// If the entry occurred less than 1 second after the previous entry and
// less than 5 seconds after the first entry in the session, include the
// entry in the current session. Otherwise, start a new session.
if (sessionValue &&
sessionEntries.length !== 0 &&
entry.startTime - lastSessionEntry.startTime < 1000 &&
entry.startTime - firstSessionEntry.startTime < 5000) {
sessionValue += entry.value;
sessionEntries.push(entry);
}
else {
sessionValue = entry.value;
sessionEntries = [entry];
}
// If the current session value is larger than the current CLS value,
// update CLS and the entries contributing to it.
if (sessionValue > metric.value) {
metric.value = sessionValue;
metric.entries = sessionEntries;
if (report) {
report();
}
}
}

@@ -33,0 +57,0 @@ };

@@ -10,3 +10,2 @@ import { SpanContext } from '@sentry/types';

private _clsEntry;
private _updatedClsEntry;
constructor();

@@ -13,0 +12,0 @@ /** Add performance related spans to a transaction */

@@ -7,3 +7,2 @@ import { __assign, __rest } from "tslib";

import { getLCP } from './web-vitals/getLCP';
import { getUpdatedCLS } from './web-vitals/getUpdatedCLS';
import { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher';

@@ -153,6 +152,6 @@ var global = getGlobalObject();

}
// If FCP is not recorded we should not record the updated cls value
// If FCP is not recorded we should not record the cls value
// according to the new definition of CLS.
if (!('fcp' in this._measurements)) {
delete this._measurements['updated-cls'];
delete this._measurements.cls;
}

@@ -187,8 +186,2 @@ transaction.setMeasurements(this._measurements);

}
if (this._updatedClsEntry && this._updatedClsEntry.sources) {
logger.log('[Measurements] Adding Updated CLS Data');
this._updatedClsEntry.sources.forEach(function (source, index) {
return transaction.setTag("updated-cls.source." + (index + 1), htmlTreeAsString(source.node));
});
}
};

@@ -198,2 +191,5 @@ /** Starts tracking the Cumulative Layout Shift on the current page. */

var _this = this;
// See:
// https://web.dev/evolving-cls/
// https://web.dev/cls-web-tooling/
getCLS(function (metric) {

@@ -208,14 +204,2 @@ var entry = metric.entries.pop();

});
// See:
// https://web.dev/evolving-cls/
// https://web.dev/cls-web-tooling/
getUpdatedCLS(function (metric) {
var entry = metric.entries.pop();
if (!entry) {
return;
}
logger.log('[Measurements] Adding Updated CLS');
_this._measurements['updated-cls'] = { value: metric.value };
_this._updatedClsEntry = entry;
});
};

@@ -222,0 +206,0 @@ /**

@@ -83,3 +83,3 @@ import { __assign, __read, __spread } from "tslib";

description: handlerData.fetchData.method + " " + handlerData.fetchData.url,
op: 'http',
op: 'http.client',
});

@@ -141,3 +141,3 @@ handlerData.fetchData.__span = span.spanId;

description: xhr.method + " " + xhr.url,
op: 'http',
op: 'http.client',
});

@@ -144,0 +144,0 @@ handlerData.xhr.__sentry_xhr_span_id__ = span.spanId;

@@ -23,9 +23,33 @@ /*

var report;
var sessionValue = 0;
var sessionEntries = [];
var entryHandler = function (entry) {
// Only count layout shifts without recent user input.
// TODO: Figure out why entry can be undefined
if (entry && !entry.hadRecentInput) {
metric.value += entry.value;
metric.entries.push(entry);
if (report) {
report();
var firstSessionEntry = sessionEntries[0];
var lastSessionEntry = sessionEntries[sessionEntries.length - 1];
// If the entry occurred less than 1 second after the previous entry and
// less than 5 seconds after the first entry in the session, include the
// entry in the current session. Otherwise, start a new session.
if (sessionValue &&
sessionEntries.length !== 0 &&
entry.startTime - lastSessionEntry.startTime < 1000 &&
entry.startTime - firstSessionEntry.startTime < 5000) {
sessionValue += entry.value;
sessionEntries.push(entry);
}
else {
sessionValue = entry.value;
sessionEntries = [entry];
}
// If the current session value is larger than the current CLS value,
// update CLS and the entries contributing to it.
if (sessionValue > metric.value) {
metric.value = sessionValue;
metric.entries = sessionEntries;
if (report) {
report();
}
}
}

@@ -32,0 +56,0 @@ };

{
"name": "@sentry/tracing",
"version": "6.10.0-beta.2",
"version": "6.10.0-beta.3",
"description": "Extensions for Sentry AM",

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

"dependencies": {
"@sentry/hub": "6.10.0-beta.2",
"@sentry/minimal": "6.10.0-beta.2",
"@sentry/types": "6.10.0-beta.2",
"@sentry/utils": "6.10.0-beta.2",
"@sentry/hub": "6.10.0-beta.3",
"@sentry/minimal": "6.10.0-beta.3",
"@sentry/types": "6.10.0-beta.3",
"@sentry/utils": "6.10.0-beta.3",
"tslib": "^1.9.3"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "6.10.0-beta.2",
"@sentry/browser": "6.10.0-beta.2",
"@sentry-internal/eslint-config-sdk": "6.10.0-beta.3",
"@sentry/browser": "6.10.0-beta.3",
"@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

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