Skip to content

Commit 2d84168

Browse files
nicohrubecclaude
andcommitted
test: Update integration tests for array attribute support
Arrays that were previously dropped by the serializer now ship as native array attributes (`type: 'array'`). Update the affected integration test expectations and bump size-limit thresholds for the five bundle scenarios whose gzipped/uncompressed sizes grew from the new serializer logic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 74ee2fe commit 2d84168

6 files changed

Lines changed: 14 additions & 8 deletions

File tree

.size-limit.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ module.exports = [
138138
path: 'packages/browser/build/npm/esm/prod/index.js',
139139
import: createImport('init', 'metrics', 'logger'),
140140
gzip: true,
141-
limit: '28 KB',
141+
limit: '29 KB',
142142
},
143143
// React SDK (ESM)
144144
{
@@ -215,13 +215,13 @@ module.exports = [
215215
name: 'CDN Bundle (incl. Tracing, Replay)',
216216
path: createCDNPath('bundle.tracing.replay.min.js'),
217217
gzip: true,
218-
limit: '82 KB',
218+
limit: '83 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: '83 KB',
224+
limit: '84 KB',
225225
},
226226
{
227227
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
@@ -283,7 +283,7 @@ module.exports = [
283283
path: createCDNPath('bundle.tracing.replay.logs.metrics.min.js'),
284284
gzip: false,
285285
brotli: false,
286-
limit: '255 KB',
286+
limit: '256 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: '268 KB',
300+
limit: '269 KB',
301301
},
302302
// Next.js SDK (ESM)
303303
{

dev-packages/browser-integration-tests/suites/public-api/logger/integration/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
177177
'sentry.message.template': { value: 'Mixed: {} {} {} {}', type: 'string' },
178178
'sentry.message.parameter.0': { value: 'prefix', type: 'string' },
179179
'sentry.message.parameter.1': { value: '{"obj":true}', type: 'string' },
180-
'sentry.message.parameter.2': { value: '[4,5,6]', type: 'string' },
180+
'sentry.message.parameter.2': { value: [4, 5, 6], type: 'array' },
181181
'sentry.message.parameter.3': { value: 'suffix', type: 'string' },
182182
},
183183
},

dev-packages/browser-integration-tests/suites/public-api/logger/scopeAttributes/subject.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Sentry.logger.info('log_before_any_scope', { log_attr: 'log_attr_1' });
33

44
Sentry.getGlobalScope().setAttributes({ global_scope_attr: true });
55

6-
// this attribute will not be sent for now
76
Sentry.getGlobalScope().setAttribute('array_attr', [1, 2, 3]);
87

98
// global scope, log attribute

dev-packages/browser-integration-tests/suites/public-api/logger/scopeAttributes/test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ sentryTest('captures logs with scope attributes', async ({ getLocalTestUrl, page
4747
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
4848
'sentry.timestamp.sequence': { value: expect.any(Number), type: 'integer' },
4949
global_scope_attr: { value: true, type: 'boolean' },
50+
array_attr: { value: [1, 2, 3], type: 'array' },
5051
log_attr: { value: 'log_attr_2', type: 'string' },
5152
},
5253
},
@@ -61,6 +62,7 @@ sentryTest('captures logs with scope attributes', async ({ getLocalTestUrl, page
6162
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
6263
'sentry.timestamp.sequence': { value: expect.any(Number), type: 'integer' },
6364
global_scope_attr: { value: true, type: 'boolean' },
65+
array_attr: { value: [1, 2, 3], type: 'array' },
6466
isolation_scope_1_attr: { value: 100, unit: 'millisecond', type: 'integer' },
6567
log_attr: { value: 'log_attr_3', type: 'string' },
6668
},
@@ -76,6 +78,7 @@ sentryTest('captures logs with scope attributes', async ({ getLocalTestUrl, page
7678
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
7779
'sentry.timestamp.sequence': { value: expect.any(Number), type: 'integer' },
7880
global_scope_attr: { value: true, type: 'boolean' },
81+
array_attr: { value: [1, 2, 3], type: 'array' },
7982
isolation_scope_1_attr: { value: 100, unit: 'millisecond', type: 'integer' },
8083
scope_attr: { value: 200, unit: 'millisecond', type: 'integer' },
8184
log_attr: { value: 'log_attr_4', type: 'string' },
@@ -92,6 +95,7 @@ sentryTest('captures logs with scope attributes', async ({ getLocalTestUrl, page
9295
'sentry.sdk.version': { value: expect.any(String), type: 'string' },
9396
'sentry.timestamp.sequence': { value: expect.any(Number), type: 'integer' },
9497
global_scope_attr: { value: true, type: 'boolean' },
98+
array_attr: { value: [1, 2, 3], type: 'array' },
9599
isolation_scope_1_attr: { value: 100, unit: 'millisecond', type: 'integer' },
96100
scope_2_attr: { value: 300, unit: 'millisecond', type: 'integer' },
97101
log_attr: { value: 'log_attr_5', type: 'string' },

dev-packages/node-integration-tests/suites/public-api/logger/scenario.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ async function run(): Promise<void> {
1515

1616
Sentry.getGlobalScope().setAttribute('global_scope_attr', true);
1717

18-
// this attribute will not be sent for now
1918
Sentry.getGlobalScope().setAttributes({ array_attr: [1, 2, 3] });
2019

2120
// global scope, log attribute

dev-packages/node-integration-tests/suites/public-api/logger/test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ describe('logs', () => {
6060
attributes: {
6161
...commonAttributes,
6262
global_scope_attr: { value: true, type: 'boolean' },
63+
array_attr: { value: [1, 2, 3], type: 'array' },
6364
log_attr: { value: 'log_attr_2', type: 'string' },
6465
},
6566
},
@@ -72,6 +73,7 @@ describe('logs', () => {
7273
attributes: {
7374
...commonAttributes,
7475
global_scope_attr: { value: true, type: 'boolean' },
76+
array_attr: { value: [1, 2, 3], type: 'array' },
7577
isolation_scope_1_attr: { value: 100, unit: 'millisecond', type: 'integer' },
7678
log_attr: { value: 'log_attr_3', type: 'string' },
7779
},
@@ -85,6 +87,7 @@ describe('logs', () => {
8587
attributes: {
8688
...commonAttributes,
8789
global_scope_attr: { value: true, type: 'boolean' },
90+
array_attr: { value: [1, 2, 3], type: 'array' },
8891
isolation_scope_1_attr: { value: 100, unit: 'millisecond', type: 'integer' },
8992
scope_attr: { value: 200, unit: 'millisecond', type: 'integer' },
9093
log_attr: { value: 'log_attr_4', type: 'string' },
@@ -99,6 +102,7 @@ describe('logs', () => {
99102
attributes: {
100103
...commonAttributes,
101104
global_scope_attr: { value: true, type: 'boolean' },
105+
array_attr: { value: [1, 2, 3], type: 'array' },
102106
isolation_scope_1_attr: { value: 100, unit: 'millisecond', type: 'integer' },
103107
scope_2_attr: { value: 300, unit: 'millisecond', type: 'integer' },
104108
log_attr: { value: 'log_attr_5', type: 'string' },

0 commit comments

Comments
 (0)