Skip to content

Commit be21d5d

Browse files
committed
Try again without try and extra logging since local is working
1 parent abf11dc commit be21d5d

File tree

2 files changed

+16
-24
lines changed
  • packages

2 files changed

+16
-24
lines changed

packages/nextjs/test/integration/test/utils/client.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,7 @@ const extractEnvelopeFromRequest = request => {
9999

100100
const assertObjectMatches = (actual, expected) => {
101101
if (Object.prototype.toString.call(actual) !== Object.prototype.toString.call(expected)) {
102-
throw new TypeError(
103-
`Types mismatch: ${actual} !== ${expected}. Actual (full): ${JSON.stringify(
104-
actual || '',
105-
)} Expected (full): ${JSON.stringify(expected)}`,
106-
);
102+
throw new TypeError(`Types mismatch: ${actual} !== ${expected}`);
107103
}
108104

109105
for (const key in expected) {

packages/tracing/src/browser/metrics/index.ts

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,22 @@ export function startTrackingWebVitals(reportAllChanges: boolean = false): void
4444
* Start tracking long tasks.
4545
*/
4646
export function startTrackingLongTasks(): void {
47-
try {
48-
const entryHandler: PerformanceEntryHandler = (entry: PerformanceEntry): void => {
49-
const transaction = getActiveTransaction() as IdleTransaction | undefined;
50-
if (!transaction) {
51-
return;
52-
}
53-
const startTime = msToSec(entry.startTime);
54-
const duration = msToSec(entry.duration);
55-
transaction.startChild({
56-
description: 'Long Task',
57-
op: 'ui.long-task',
58-
startTimestamp: startTime,
59-
endTimestamp: startTime + duration,
60-
});
61-
};
47+
const entryHandler: PerformanceEntryHandler = (entry: PerformanceEntry): void => {
48+
const transaction = getActiveTransaction() as IdleTransaction | undefined;
49+
if (!transaction) {
50+
return;
51+
}
52+
const startTime = msToSec(entry.startTime);
53+
const duration = msToSec(entry.duration);
54+
transaction.startChild({
55+
description: 'Long Task',
56+
op: 'ui.long-task',
57+
startTimestamp: startTime,
58+
endTimestamp: startTime + duration,
59+
});
60+
};
6261

63-
observe('longtask', entryHandler);
64-
} catch (_) {
65-
// Do nothing
66-
}
62+
observe('longtask', entryHandler);
6763
}
6864

6965
/** Starts tracking the Cumulative Layout Shift on the current page. */

0 commit comments

Comments
 (0)