Skip to content

Commit 8ed3598

Browse files
authored
feat(v8/core): Remove deprecated updateWithContext method (#10800)
ref #10677
1 parent 372e405 commit 8ed3598

File tree

4 files changed

+0
-48
lines changed

4 files changed

+0
-48
lines changed

packages/core/src/tracing/sentrySpan.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -441,29 +441,6 @@ export class SentrySpan implements SpanInterface {
441441
});
442442
}
443443

444-
/**
445-
* @inheritDoc
446-
*
447-
* @deprecated Update the fields directly instead.
448-
*/
449-
public updateWithContext(spanContext: SpanContext): this {
450-
// eslint-disable-next-line deprecation/deprecation
451-
this.data = spanContext.data || {};
452-
this._name = spanContext.name;
453-
this._endTime = spanContext.endTimestamp;
454-
this._attributes = { ...this._attributes, [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op };
455-
this._parentSpanId = spanContext.parentSpanId;
456-
this._sampled = spanContext.sampled;
457-
this._spanId = spanContext.spanId || this._spanId;
458-
this._startTime = spanContext.startTimestamp || this._startTime;
459-
this._status = spanContext.status;
460-
// eslint-disable-next-line deprecation/deprecation
461-
this.tags = spanContext.tags || {};
462-
this._traceId = spanContext.traceId || this._traceId;
463-
464-
return this;
465-
}
466-
467444
/**
468445
* @inheritDoc
469446
*

packages/core/src/tracing/transaction.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,6 @@ export class Transaction extends SentrySpan implements TransactionInterface {
198198
});
199199
}
200200

201-
/**
202-
* @inheritDoc
203-
*/
204-
public updateWithContext(transactionContext: TransactionContext): this {
205-
// eslint-disable-next-line deprecation/deprecation
206-
super.updateWithContext(transactionContext);
207-
208-
this._name = transactionContext.name || '';
209-
this._trimEnd = transactionContext.trimEnd;
210-
211-
return this;
212-
}
213-
214201
/**
215202
* @inheritdoc
216203
*

packages/types/src/span.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,6 @@ export interface Span extends Omit<SpanContext, 'name' | 'op' | 'status' | 'orig
307307
*/
308308
toContext(): SpanContext;
309309

310-
/**
311-
* Updates the current span with a new `SpanContext`.
312-
* @deprecated Update the fields directly instead.
313-
*/
314-
updateWithContext(spanContext: SpanContext): this;
315-
316310
/**
317311
* Convert the object to JSON for w. spans array info only.
318312
* @deprecated Use `spanToTraceContext()` util function instead.

packages/types/src/transaction.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ export interface Transaction extends Omit<TransactionContext, 'name' | 'op'>, Sp
113113
*/
114114
toContext(): TransactionContext;
115115

116-
/**
117-
* Updates the current transaction with a new `TransactionContext`.
118-
* @deprecated Update the fields directly instead.
119-
*/
120-
updateWithContext(transactionContext: TransactionContext): this;
121-
122116
/**
123117
* Set metadata for this transaction.
124118
* @deprecated Use attributes or store data on the scope instead.

0 commit comments

Comments
 (0)