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 {
143
143
this . instrumenter = spanContext . instrumenter || 'sentry' ;
144
144
145
145
this . _attributes = { } ;
146
+ const { measurements, ...attributes } = spanContext . attributes || { } ;
146
147
this . setAttributes ( {
147
148
[ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : spanContext . origin || 'manual' ,
148
149
[ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : spanContext . op ,
149
- ...spanContext . attributes ,
150
+ [ SEMANTIC_ATTRIBUTE_MEASUREMENTS ] : measurements ,
151
+ ...attributes ,
150
152
} ) ;
151
153
152
154
// eslint-disable-next-line deprecation/deprecation
Original file line number Diff line number Diff line change @@ -105,9 +105,6 @@ describe('span', () => {
105
105
it ( 'disallows invalid attribute types' , ( ) => {
106
106
const span = new Span ( ) ;
107
107
108
- /** @ts -expect-error this is invalid */
109
- span . setAttribute ( 'str' , { } ) ;
110
-
111
108
/** @ts -expect-error this is invalid */
112
109
span . setAttribute ( 'str' , null ) ;
113
110
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ export type SpanAttributeValue =
22
22
| boolean
23
23
| Array < null | undefined | string >
24
24
| Array < null | undefined | number >
25
- | Array < null | undefined | boolean > ;
25
+ | Array < null | undefined | boolean >
26
+ | Measurements ;
26
27
27
28
export type SpanAttributes = Partial < {
28
29
'sentry.origin' : string ;
You can’t perform that action at this time.
0 commit comments