File tree Expand file tree Collapse file tree 2 files changed +5
-20
lines changed
packages/core/src/tracing Expand file tree Collapse file tree 2 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -130,14 +130,14 @@ export class Span implements SpanInterface {
130
130
this . tags = spanContext . tags ? { ...spanContext . tags } : { } ;
131
131
// eslint-disable-next-line deprecation/deprecation
132
132
this . data = spanContext . data ? { ...spanContext . data } : { } ;
133
- this . _attributes = spanContext . attributes ? { ...spanContext . attributes } : { } ;
134
133
// eslint-disable-next-line deprecation/deprecation
135
134
this . instrumenter = spanContext . instrumenter || 'sentry' ;
136
135
137
- this . setAttribute (
138
- SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ,
139
- spanContext . origin || this . _attributes [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] || 'manual' ,
140
- ) ;
136
+ this . _attributes = {
137
+ [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : spanContext . origin || 'manual' ,
138
+ [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : spanContext . op ,
139
+ ...spanContext . attributes ,
140
+ } ;
141
141
142
142
// eslint-disable-next-line deprecation/deprecation
143
143
this . _name = spanContext . name || spanContext . description ;
@@ -149,9 +149,6 @@ export class Span implements SpanInterface {
149
149
if ( 'sampled' in spanContext ) {
150
150
this . _sampled = spanContext . sampled ;
151
151
}
152
- if ( spanContext . op ) {
153
- this . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_OP , spanContext . op ) ;
154
- }
155
152
if ( spanContext . status ) {
156
153
this . _status = spanContext . status ;
157
154
}
Original file line number Diff line number Diff line change @@ -391,17 +391,5 @@ function normalizeContext(context: StartSpanOptions): TransactionContext {
391
391
return ctx ;
392
392
}
393
393
394
- // TODO (v8): Remove this normalization once we remove top-level context.origin
395
- // eslint-disable-next-line deprecation/deprecation
396
- if ( context . origin ) {
397
- context . attributes = {
398
- // eslint-disable-next-line deprecation/deprecation
399
- 'sentry.origin' : context . origin ,
400
- ...context . attributes , // potentially set attributes value takes precedence
401
- } ;
402
- // eslint-disable-next-line deprecation/deprecation
403
- delete context . origin ;
404
- }
405
-
406
394
return context ;
407
395
}
You can’t perform that action at this time.
0 commit comments