File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,12 @@ export class Span implements SpanInterface {
143143 this . instrumenter = spanContext . instrumenter || 'sentry' ;
144144
145145 this . _attributes = { } ;
146+ const { measurements, ...attributes } = spanContext . attributes || { } ;
146147 this . setAttributes ( {
147148 [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : spanContext . origin || 'manual' ,
148149 [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : spanContext . op ,
149- ...spanContext . attributes ,
150+ [ SEMANTIC_ATTRIBUTE_MEASUREMENTS ] : measurements ,
151+ ...attributes ,
150152 } ) ;
151153
152154 // eslint-disable-next-line deprecation/deprecation
Original file line number Diff line number Diff line change @@ -105,9 +105,6 @@ describe('span', () => {
105105 it ( 'disallows invalid attribute types' , ( ) => {
106106 const span = new Span ( ) ;
107107
108- /** @ts -expect-error this is invalid */
109- span . setAttribute ( 'str' , { } ) ;
110-
111108 /** @ts -expect-error this is invalid */
112109 span . setAttribute ( 'str' , null ) ;
113110
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ export type SpanAttributeValue =
2222 | boolean
2323 | Array < null | undefined | string >
2424 | Array < null | undefined | number >
25- | Array < null | undefined | boolean > ;
25+ | Array < null | undefined | boolean >
26+ | Measurements ;
2627
2728export type SpanAttributes = Partial < {
2829 'sentry.origin' : string ;
You can’t perform that action at this time.
0 commit comments