@sentry/tracing
Advanced tools
Comparing version 6.3.0 to 6.3.1
@@ -8,2 +8,3 @@ import { SpanContext } from '@sentry/types'; | ||
private _performanceCursor; | ||
private _lcpEntry; | ||
constructor(); | ||
@@ -10,0 +11,0 @@ /** Add performance related spans to a transaction */ |
@@ -138,2 +138,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
transaction.setMeasurements(this._measurements); | ||
if (this._lcpEntry) { | ||
utils_1.logger.log('[Measurements] Adding LCP Data'); | ||
// Capture Properties of the LCP element that contributes to the LCP. | ||
if (this._lcpEntry.element) { | ||
transaction.setTag('lcp.element', utils_1.htmlTreeAsString(this._lcpEntry.element)); | ||
} | ||
if (this._lcpEntry.id) { | ||
transaction.setTag('lcp.id', this._lcpEntry.id); | ||
} | ||
if (this._lcpEntry.url) { | ||
// Trim URL to the first 200 characters. | ||
transaction.setTag('lcp.url', this._lcpEntry.url.trim().slice(0, 200)); | ||
} | ||
transaction.setTag('lcp.size', this._lcpEntry.size); | ||
} | ||
} | ||
@@ -197,2 +212,3 @@ }; | ||
_this._measurements['mark.lcp'] = { value: timeOrigin + startTime }; | ||
_this._lcpEntry = entry; | ||
}); | ||
@@ -199,0 +215,0 @@ }; |
import { ReportHandler } from './types'; | ||
export interface LargestContentfulPaint extends PerformanceEntry { | ||
renderTime: DOMHighResTimeStamp; | ||
loadTime: DOMHighResTimeStamp; | ||
size: number; | ||
id: string; | ||
url: string; | ||
element?: Element; | ||
toJSON(): Record<string, string>; | ||
} | ||
export declare const getLCP: (onReport: ReportHandler, reportAllChanges?: boolean) => void; | ||
//# sourceMappingURL=getLCP.d.ts.map |
@@ -8,2 +8,3 @@ import { SpanContext } from '@sentry/types'; | ||
private _performanceCursor; | ||
private _lcpEntry; | ||
constructor(); | ||
@@ -10,0 +11,0 @@ /** Add performance related spans to a transaction */ |
import { __assign, __rest } from "tslib"; | ||
import { browserPerformanceTimeOrigin, getGlobalObject, logger } from '@sentry/utils'; | ||
import { browserPerformanceTimeOrigin, getGlobalObject, htmlTreeAsString, logger } from '@sentry/utils'; | ||
import { msToSec } from '../utils'; | ||
@@ -137,2 +137,17 @@ import { getCLS } from './web-vitals/getCLS'; | ||
transaction.setMeasurements(this._measurements); | ||
if (this._lcpEntry) { | ||
logger.log('[Measurements] Adding LCP Data'); | ||
// Capture Properties of the LCP element that contributes to the LCP. | ||
if (this._lcpEntry.element) { | ||
transaction.setTag('lcp.element', htmlTreeAsString(this._lcpEntry.element)); | ||
} | ||
if (this._lcpEntry.id) { | ||
transaction.setTag('lcp.id', this._lcpEntry.id); | ||
} | ||
if (this._lcpEntry.url) { | ||
// Trim URL to the first 200 characters. | ||
transaction.setTag('lcp.url', this._lcpEntry.url.trim().slice(0, 200)); | ||
} | ||
transaction.setTag('lcp.size', this._lcpEntry.size); | ||
} | ||
} | ||
@@ -196,2 +211,3 @@ }; | ||
_this._measurements['mark.lcp'] = { value: timeOrigin + startTime }; | ||
_this._lcpEntry = entry; | ||
}); | ||
@@ -198,0 +214,0 @@ }; |
import { ReportHandler } from './types'; | ||
export interface LargestContentfulPaint extends PerformanceEntry { | ||
renderTime: DOMHighResTimeStamp; | ||
loadTime: DOMHighResTimeStamp; | ||
size: number; | ||
id: string; | ||
url: string; | ||
element?: Element; | ||
toJSON(): Record<string, string>; | ||
} | ||
export declare const getLCP: (onReport: ReportHandler, reportAllChanges?: boolean) => void; | ||
//# sourceMappingURL=getLCP.d.ts.map |
{ | ||
"name": "@sentry/tracing", | ||
"version": "6.3.0", | ||
"version": "6.3.1", | ||
"description": "Extensions for Sentry AM", | ||
@@ -19,11 +19,11 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/hub": "6.3.0", | ||
"@sentry/minimal": "6.3.0", | ||
"@sentry/types": "6.3.0", | ||
"@sentry/utils": "6.3.0", | ||
"@sentry/hub": "6.3.1", | ||
"@sentry/minimal": "6.3.1", | ||
"@sentry/types": "6.3.1", | ||
"@sentry/utils": "6.3.1", | ||
"tslib": "^1.9.3" | ||
}, | ||
"devDependencies": { | ||
"@sentry-internal/eslint-config-sdk": "6.3.0", | ||
"@sentry/browser": "6.3.0", | ||
"@sentry-internal/eslint-config-sdk": "6.3.1", | ||
"@sentry/browser": "6.3.1", | ||
"@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
2183594
16190
39
+ Added@sentry/hub@6.3.1(transitive)
+ Added@sentry/minimal@6.3.1(transitive)
+ Added@sentry/types@6.3.1(transitive)
+ Added@sentry/utils@6.3.1(transitive)
- Removed@sentry/hub@6.3.0(transitive)
- Removed@sentry/minimal@6.3.0(transitive)
- Removed@sentry/types@6.3.0(transitive)
- Removed@sentry/utils@6.3.0(transitive)
Updated@sentry/hub@6.3.1
Updated@sentry/minimal@6.3.1
Updated@sentry/types@6.3.1
Updated@sentry/utils@6.3.1