Skip to content

Commit b307949

Browse files
committed
guard DEBUG_BUILD && fix size limit
1 parent 43037a5 commit b307949

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

.size-limit.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = [
3838
path: 'packages/browser/build/npm/esm/prod/index.js',
3939
import: createImport('init', 'browserTracingIntegration'),
4040
gzip: true,
41-
limit: '43 KB',
41+
limit: '44 KB',
4242
},
4343
{
4444
name: '@sentry/browser (incl. Tracing + Span Streaming)',
@@ -52,14 +52,14 @@ module.exports = [
5252
path: 'packages/browser/build/npm/esm/prod/index.js',
5353
import: createImport('init', 'browserTracingIntegration', 'browserProfilingIntegration'),
5454
gzip: true,
55-
limit: '48 KB',
55+
limit: '49 KB',
5656
},
5757
{
5858
name: '@sentry/browser (incl. Tracing, Replay)',
5959
path: 'packages/browser/build/npm/esm/prod/index.js',
6060
import: createImport('init', 'browserTracingIntegration', 'replayIntegration'),
6161
gzip: true,
62-
limit: '82 KB',
62+
limit: '83 KB',
6363
},
6464
{
6565
name: '@sentry/browser (incl. Tracing, Replay) - with treeshaking flags',
@@ -89,14 +89,14 @@ module.exports = [
8989
path: 'packages/browser/build/npm/esm/prod/index.js',
9090
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
9191
gzip: true,
92-
limit: '87 KB',
92+
limit: '88 KB',
9393
},
9494
{
9595
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
9696
path: 'packages/browser/build/npm/esm/prod/index.js',
9797
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration'),
9898
gzip: true,
99-
limit: '99 KB',
99+
limit: '100 KB',
100100
},
101101
{
102102
name: '@sentry/browser (incl. Feedback)',
@@ -170,7 +170,7 @@ module.exports = [
170170
path: 'packages/vue/build/esm/index.js',
171171
import: createImport('init', 'browserTracingIntegration'),
172172
gzip: true,
173-
limit: '45 KB',
173+
limit: '46 KB',
174174
},
175175
// Svelte SDK (ESM)
176176
{
@@ -191,7 +191,7 @@ module.exports = [
191191
name: 'CDN Bundle (incl. Tracing)',
192192
path: createCDNPath('bundle.tracing.min.js'),
193193
gzip: true,
194-
limit: '44 KB',
194+
limit: '45 KB',
195195
},
196196
{
197197
name: 'CDN Bundle (incl. Logs, Metrics)',
@@ -203,7 +203,7 @@ module.exports = [
203203
name: 'CDN Bundle (incl. Tracing, Logs, Metrics)',
204204
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
205205
gzip: true,
206-
limit: '45 KB',
206+
limit: '46 KB',
207207
},
208208
{
209209
name: 'CDN Bundle (incl. Replay, Logs, Metrics)',
@@ -215,25 +215,25 @@ module.exports = [
215215
name: 'CDN Bundle (incl. Tracing, Replay)',
216216
path: createCDNPath('bundle.tracing.replay.min.js'),
217217
gzip: true,
218-
limit: '81 KB',
218+
limit: '82 KB',
219219
},
220220
{
221221
name: 'CDN Bundle (incl. Tracing, Replay, Logs, Metrics)',
222222
path: createCDNPath('bundle.tracing.replay.logs.metrics.min.js'),
223223
gzip: true,
224-
limit: '82 KB',
224+
limit: '83 KB',
225225
},
226226
{
227227
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
228228
path: createCDNPath('bundle.tracing.replay.feedback.min.js'),
229229
gzip: true,
230-
limit: '87 KB',
230+
limit: '88 KB',
231231
},
232232
{
233233
name: 'CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)',
234234
path: createCDNPath('bundle.tracing.replay.feedback.logs.metrics.min.js'),
235235
gzip: true,
236-
limit: '88 KB',
236+
limit: '89 KB',
237237
},
238238
// browser CDN bundles (non-gzipped)
239239
{
@@ -248,7 +248,7 @@ module.exports = [
248248
path: createCDNPath('bundle.tracing.min.js'),
249249
gzip: false,
250250
brotli: false,
251-
limit: '130 KB',
251+
limit: '134 KB',
252252
},
253253
{
254254
name: 'CDN Bundle (incl. Logs, Metrics) - uncompressed',
@@ -262,7 +262,7 @@ module.exports = [
262262
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
263263
gzip: false,
264264
brotli: false,
265-
limit: '134 KB',
265+
limit: '137 KB',
266266
},
267267
{
268268
name: 'CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed',
@@ -276,14 +276,14 @@ module.exports = [
276276
path: createCDNPath('bundle.tracing.replay.min.js'),
277277
gzip: false,
278278
brotli: false,
279-
limit: '248 KB',
279+
limit: '251 KB',
280280
},
281281
{
282282
name: 'CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed',
283283
path: createCDNPath('bundle.tracing.replay.logs.metrics.min.js'),
284284
gzip: false,
285285
brotli: false,
286-
limit: '251 KB',
286+
limit: '254 KB',
287287
},
288288
{
289289
name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed',
@@ -297,7 +297,7 @@ module.exports = [
297297
path: createCDNPath('bundle.tracing.replay.feedback.logs.metrics.min.js'),
298298
gzip: false,
299299
brotli: false,
300-
limit: '264 KB',
300+
limit: '267 KB',
301301
},
302302
// Next.js SDK (ESM)
303303
{
@@ -306,7 +306,7 @@ module.exports = [
306306
import: createImport('init'),
307307
ignore: ['next/router', 'next/constants'],
308308
gzip: true,
309-
limit: '48 KB',
309+
limit: '49 KB',
310310
},
311311
// SvelteKit SDK (ESM)
312312
{
@@ -315,7 +315,7 @@ module.exports = [
315315
import: createImport('init'),
316316
ignore: ['$app/stores'],
317317
gzip: true,
318-
limit: '44 KB',
318+
limit: '45 KB',
319319
},
320320
// Node-Core SDK (ESM)
321321
{

packages/browser-utils/src/metrics/browserMetrics.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { getBrowserPerformanceAPI, isMeasurementValue, msToSec, startAndEndSpan
2828
import { getActivationStart } from './web-vitals/lib/getActivationStart';
2929
import { getNavigationEntry } from './web-vitals/lib/getNavigationEntry';
3030
import { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher';
31+
import { DEBUG_BUILD } from '../debug-build';
3132
interface NavigatorNetworkInformation {
3233
readonly connection?: NetworkInformation;
3334
}
@@ -431,7 +432,7 @@ export function addPerformanceEntries(span: Span, options: AddPerformanceEntries
431432
const setAttr = (shortWebVitalName: string, value: number, customAttrName?: string) => {
432433
const attrKey = customAttrName ?? `browser.web_vital.${shortWebVitalName}.value`;
433434
span.setAttribute(attrKey, value);
434-
debug.log('Setting web vital attribute', { [attrKey]: value }, 'on pageload span');
435+
DEBUG_BUILD && debug.log('Setting web vital attribute', { [attrKey]: value }, 'on pageload span');
435436
};
436437
// for streamed pageload spans, we add the web vital measurements as attributes.
437438
// We omit LCP, CLS and INP because they're tracked separately as spans

0 commit comments

Comments
 (0)