@sentry/tracing
Advanced tools
Comparing version 6.12.0-beta.2 to 6.12.0
import { Hub } from '@sentry/hub'; | ||
import { EventProcessor, Integration, Transaction, TransactionContext } from '@sentry/types'; | ||
import { MetricsInstrumentationOptions } from './metrics'; | ||
import { RequestInstrumentationOptions } from './request'; | ||
@@ -45,10 +44,2 @@ export declare const DEFAULT_MAX_TRANSACTION_DURATION_SECONDS = 600; | ||
/** | ||
* _metricOptions allows the user to send options to change how metrics are collected. | ||
* | ||
* _metricOptions is currently experimental. | ||
* | ||
* Default: undefined | ||
*/ | ||
_metricOptions?: Partial<MetricsInstrumentationOptions>; | ||
/** | ||
* beforeNavigate is called before a pageload/navigation transaction is created and allows users to modify transaction | ||
@@ -55,0 +46,0 @@ * context data, or drop the transaction entirely (by setting `sampled = false` in the context). |
@@ -27,2 +27,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
this.name = BrowserTracing.id; | ||
this._metrics = new metrics_1.MetricsInstrumentation(); | ||
this._emitOptionsWarning = false; | ||
@@ -41,3 +42,2 @@ var tracingOrigins = request_1.defaultRequestInstrumentationOptions.tracingOrigins; | ||
this.options = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, DEFAULT_BROWSER_TRACING_OPTIONS), _options), { tracingOrigins: tracingOrigins }); | ||
this._metrics = new metrics_1.MetricsInstrumentation(tslib_1.__assign(tslib_1.__assign({}, metrics_1.DEFAULT_METRICS_INSTR_OPTIONS), this.options._metricOptions)); | ||
} | ||
@@ -44,0 +44,0 @@ /** |
import { SpanContext } from '@sentry/types'; | ||
import { Span } from '../span'; | ||
import { Transaction } from '../transaction'; | ||
/** | ||
* Exports a way to add options to our metric collection. Currently experimental. | ||
*/ | ||
export interface MetricsInstrumentationOptions { | ||
_reportAllChanges: boolean; | ||
} | ||
export declare const DEFAULT_METRICS_INSTR_OPTIONS: MetricsInstrumentationOptions; | ||
/** Class tracking metrics */ | ||
@@ -17,3 +10,3 @@ export declare class MetricsInstrumentation { | ||
private _clsEntry; | ||
constructor(_options: MetricsInstrumentationOptions); | ||
constructor(); | ||
/** Add performance related spans to a transaction */ | ||
@@ -20,0 +13,0 @@ addPerformanceEntries(transaction: Transaction): void; |
@@ -10,12 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
var global = utils_1.getGlobalObject(); | ||
exports.DEFAULT_METRICS_INSTR_OPTIONS = { | ||
_reportAllChanges: false, | ||
}; | ||
/** Class tracking metrics */ | ||
var MetricsInstrumentation = /** @class */ (function () { | ||
function MetricsInstrumentation(_options) { | ||
var _a; | ||
function MetricsInstrumentation() { | ||
var _a, _b; | ||
this._measurements = {}; | ||
this._performanceCursor = 0; | ||
if (!utils_1.isNodeEnv() && ((_a = global) === null || _a === void 0 ? void 0 : _a.performance)) { | ||
if (!utils_1.isNodeEnv() && ((_a = global) === null || _a === void 0 ? void 0 : _a.performance) && ((_b = global) === null || _b === void 0 ? void 0 : _b.document)) { | ||
if (global.performance.mark) { | ||
@@ -25,3 +22,3 @@ global.performance.mark('sentry-tracing-init'); | ||
this._trackCLS(); | ||
this._trackLCP(_options._reportAllChanges); | ||
this._trackLCP(); | ||
this._trackFID(); | ||
@@ -239,3 +236,3 @@ } | ||
/** Starts tracking the Largest Contentful Paint on the current page. */ | ||
MetricsInstrumentation.prototype._trackLCP = function (reportAllChanges) { | ||
MetricsInstrumentation.prototype._trackLCP = function () { | ||
var _this = this; | ||
@@ -253,3 +250,3 @@ getLCP_1.getLCP(function (metric) { | ||
_this._lcpEntry = entry; | ||
}, reportAllChanges); | ||
}); | ||
}; | ||
@@ -256,0 +253,0 @@ /** Starts tracking the First Input Delay on the current page. */ |
import { Hub } from '@sentry/hub'; | ||
import { EventProcessor, Integration, Transaction, TransactionContext } from '@sentry/types'; | ||
import { MetricsInstrumentationOptions } from './metrics'; | ||
import { RequestInstrumentationOptions } from './request'; | ||
@@ -45,10 +44,2 @@ export declare const DEFAULT_MAX_TRANSACTION_DURATION_SECONDS = 600; | ||
/** | ||
* _metricOptions allows the user to send options to change how metrics are collected. | ||
* | ||
* _metricOptions is currently experimental. | ||
* | ||
* Default: undefined | ||
*/ | ||
_metricOptions?: Partial<MetricsInstrumentationOptions>; | ||
/** | ||
* beforeNavigate is called before a pageload/navigation transaction is created and allows users to modify transaction | ||
@@ -55,0 +46,0 @@ * context data, or drop the transaction entirely (by setting `sampled = false` in the context). |
@@ -8,3 +8,3 @@ import { __assign } from "tslib"; | ||
import { registerBackgroundTabDetection } from './backgroundtab'; | ||
import { DEFAULT_METRICS_INSTR_OPTIONS, MetricsInstrumentation } from './metrics'; | ||
import { MetricsInstrumentation } from './metrics'; | ||
import { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, } from './request'; | ||
@@ -27,2 +27,3 @@ import { instrumentRoutingWithDefaults } from './router'; | ||
this.name = BrowserTracing.id; | ||
this._metrics = new MetricsInstrumentation(); | ||
this._emitOptionsWarning = false; | ||
@@ -41,3 +42,2 @@ var tracingOrigins = defaultRequestInstrumentationOptions.tracingOrigins; | ||
this.options = __assign(__assign(__assign({}, DEFAULT_BROWSER_TRACING_OPTIONS), _options), { tracingOrigins: tracingOrigins }); | ||
this._metrics = new MetricsInstrumentation(__assign(__assign({}, DEFAULT_METRICS_INSTR_OPTIONS), this.options._metricOptions)); | ||
} | ||
@@ -44,0 +44,0 @@ /** |
import { SpanContext } from '@sentry/types'; | ||
import { Span } from '../span'; | ||
import { Transaction } from '../transaction'; | ||
/** | ||
* Exports a way to add options to our metric collection. Currently experimental. | ||
*/ | ||
export interface MetricsInstrumentationOptions { | ||
_reportAllChanges: boolean; | ||
} | ||
export declare const DEFAULT_METRICS_INSTR_OPTIONS: MetricsInstrumentationOptions; | ||
/** Class tracking metrics */ | ||
@@ -17,3 +10,3 @@ export declare class MetricsInstrumentation { | ||
private _clsEntry; | ||
constructor(_options: MetricsInstrumentationOptions); | ||
constructor(); | ||
/** Add performance related spans to a transaction */ | ||
@@ -20,0 +13,0 @@ addPerformanceEntries(transaction: Transaction): void; |
@@ -9,12 +9,9 @@ import { __assign, __rest } from "tslib"; | ||
var global = getGlobalObject(); | ||
export var DEFAULT_METRICS_INSTR_OPTIONS = { | ||
_reportAllChanges: false, | ||
}; | ||
/** Class tracking metrics */ | ||
var MetricsInstrumentation = /** @class */ (function () { | ||
function MetricsInstrumentation(_options) { | ||
var _a; | ||
function MetricsInstrumentation() { | ||
var _a, _b; | ||
this._measurements = {}; | ||
this._performanceCursor = 0; | ||
if (!isNodeEnv() && ((_a = global) === null || _a === void 0 ? void 0 : _a.performance)) { | ||
if (!isNodeEnv() && ((_a = global) === null || _a === void 0 ? void 0 : _a.performance) && ((_b = global) === null || _b === void 0 ? void 0 : _b.document)) { | ||
if (global.performance.mark) { | ||
@@ -24,3 +21,3 @@ global.performance.mark('sentry-tracing-init'); | ||
this._trackCLS(); | ||
this._trackLCP(_options._reportAllChanges); | ||
this._trackLCP(); | ||
this._trackFID(); | ||
@@ -238,3 +235,3 @@ } | ||
/** Starts tracking the Largest Contentful Paint on the current page. */ | ||
MetricsInstrumentation.prototype._trackLCP = function (reportAllChanges) { | ||
MetricsInstrumentation.prototype._trackLCP = function () { | ||
var _this = this; | ||
@@ -252,3 +249,3 @@ getLCP(function (metric) { | ||
_this._lcpEntry = entry; | ||
}, reportAllChanges); | ||
}); | ||
}; | ||
@@ -255,0 +252,0 @@ /** Starts tracking the First Input Delay on the current page. */ |
{ | ||
"name": "@sentry/tracing", | ||
"version": "6.12.0-beta.2", | ||
"version": "6.12.0", | ||
"description": "Extensions for Sentry AM", | ||
@@ -19,11 +19,11 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/hub": "6.12.0-beta.2", | ||
"@sentry/minimal": "6.12.0-beta.2", | ||
"@sentry/types": "6.12.0-beta.2", | ||
"@sentry/utils": "6.12.0-beta.2", | ||
"@sentry/hub": "6.12.0", | ||
"@sentry/minimal": "6.12.0", | ||
"@sentry/types": "6.12.0", | ||
"@sentry/utils": "6.12.0", | ||
"tslib": "^1.9.3" | ||
}, | ||
"devDependencies": { | ||
"@sentry-internal/eslint-config-sdk": "6.12.0-beta.2", | ||
"@sentry/browser": "6.12.0-beta.2", | ||
"@sentry-internal/eslint-config-sdk": "6.12.0", | ||
"@sentry/browser": "6.12.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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
2266048
16521
+ Added@sentry/hub@6.12.0(transitive)
+ Added@sentry/minimal@6.12.0(transitive)
+ Added@sentry/types@6.12.0(transitive)
+ Added@sentry/utils@6.12.0(transitive)
- Removed@sentry/hub@6.12.0-beta.2(transitive)
- Removed@sentry/minimal@6.12.0-beta.2(transitive)
- Removed@sentry/types@6.12.0-beta.2(transitive)
- Removed@sentry/utils@6.12.0-beta.2(transitive)
Updated@sentry/hub@6.12.0
Updated@sentry/minimal@6.12.0
Updated@sentry/types@6.12.0
Updated@sentry/utils@6.12.0