Skip to content

Commit fd66a7d

Browse files
nicohrubecclaude
andcommitted
ref(browser): Use safeSetSpanJSONAttributes in cultureContext integration
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 66c6850 commit fd66a7d

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

packages/browser/src/integrations/culturecontext.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { CultureContext, IntegrationFn } from '@sentry/core';
2-
import { defineIntegration } from '@sentry/core';
2+
import { defineIntegration, safeSetSpanJSONAttributes } from '@sentry/core';
33
import { WINDOW } from '../helpers';
44

55
const INTEGRATION_NAME = 'CultureContext';
@@ -21,12 +21,11 @@ const _cultureContextIntegration = (() => {
2121
const culture = getCultureContext();
2222

2323
if (culture) {
24-
span.attributes = {
24+
safeSetSpanJSONAttributes(span, {
2525
'culture.locale': culture.locale,
2626
'culture.timezone': culture.timezone,
2727
'culture.calendar': culture.calendar,
28-
...span.attributes,
29-
};
28+
});
3029
}
3130
},
3231
};

0 commit comments

Comments
 (0)