Socket
Socket
Sign inDemoInstall

@sentry-internal/tracing

Package Overview
Dependencies
4
Maintainers
10
Versions
120
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.65.0-alpha.0 to 7.65.0

1

cjs/browser/browsertracing.js

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

// If both 1 and either one of 2 or 3 are set (from above), we log out a warning.
// eslint-disable-next-line deprecation/deprecation
const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets;

@@ -122,0 +123,0 @@ if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) {

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

traceXHR,
// eslint-disable-next-line deprecation/deprecation
tracePropagationTargets,

@@ -68,2 +69,11 @@ // eslint-disable-next-line deprecation/deprecation

function isPerformanceResourceTiming(entry) {
return (
entry.entryType === 'resource' &&
'initiatorType' in entry &&
typeof (entry ).nextHopProtocol === 'string' &&
(entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')
);
}
/**

@@ -78,5 +88,5 @@ * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,

const observer = new PerformanceObserver(list => {
const entries = list.getEntries() ;
const entries = list.getEntries();
entries.forEach(entry => {
if ((entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest') && entry.name.endsWith(url)) {
if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {
const spanData = resourceTimingEntryToSpanData(entry);

@@ -124,3 +134,3 @@ spanData.forEach(data => span.setData(...data));

function getAbsoluteTime(time) {
function getAbsoluteTime(time = 0) {
return ((utils.browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;

@@ -127,0 +137,0 @@ }

@@ -118,2 +118,3 @@ import { TRACING_DEFAULTS, addTracingExtensions, startIdleTransaction, getActiveTransaction } from '@sentry/core';

// If both 1 and either one of 2 or 3 are set (from above), we log out a warning.
// eslint-disable-next-line deprecation/deprecation
const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets;

@@ -120,0 +121,0 @@ if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) {

@@ -24,2 +24,3 @@ import { hasTracingEnabled, getCurrentHub, getDynamicSamplingContextFromClient } from '@sentry/core';

traceXHR,
// eslint-disable-next-line deprecation/deprecation
tracePropagationTargets,

@@ -66,2 +67,11 @@ // eslint-disable-next-line deprecation/deprecation

function isPerformanceResourceTiming(entry) {
return (
entry.entryType === 'resource' &&
'initiatorType' in entry &&
typeof (entry ).nextHopProtocol === 'string' &&
(entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')
);
}
/**

@@ -76,5 +86,5 @@ * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,

const observer = new PerformanceObserver(list => {
const entries = list.getEntries() ;
const entries = list.getEntries();
entries.forEach(entry => {
if ((entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest') && entry.name.endsWith(url)) {
if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {
const spanData = resourceTimingEntryToSpanData(entry);

@@ -122,3 +132,3 @@ spanData.forEach(data => span.setData(...data));

function getAbsoluteTime(time) {
function getAbsoluteTime(time = 0) {
return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;

@@ -125,0 +135,0 @@ }

8

package.json
{
"name": "@sentry-internal/tracing",
"version": "7.65.0-alpha.0",
"version": "7.65.0",
"description": "Sentry Internal Tracing Package",

@@ -26,5 +26,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/core": "7.65.0-alpha.0",
"@sentry/types": "7.65.0-alpha.0",
"@sentry/utils": "7.65.0-alpha.0",
"@sentry/core": "7.65.0",
"@sentry/types": "7.65.0",
"@sentry/utils": "7.65.0",
"tslib": "^2.4.1 || ^1.9.3"

@@ -31,0 +31,0 @@ },

@@ -16,3 +16,6 @@ import type { Client, Scope, Span } from '@sentry/types';

*
* Default: ['localhost', /^\//] {@see DEFAULT_TRACE_PROPAGATION_TARGETS}
* @deprecated Use the top-level `tracePropagationTargets` option in `Sentry.init` instead.
* This option will be removed in v8.
*
* Default: ['localhost', /^\//] @see {DEFAULT_TRACE_PROPAGATION_TARGETS}
*/

@@ -19,0 +22,0 @@ tracePropagationTargets: Array<string | RegExp>;

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc