Skip to content

Commit

Permalink
feat(v8/core): Remove deprecated updateWithContext method (#10800)
Browse files Browse the repository at this point in the history
ref #10677
  • Loading branch information
AbhiPrasad authored Feb 26, 2024
1 parent 372e405 commit 8ed3598
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 48 deletions.
23 changes: 0 additions & 23 deletions packages/core/src/tracing/sentrySpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,29 +441,6 @@ export class SentrySpan implements SpanInterface {
});
}

/**
* @inheritDoc
*
* @deprecated Update the fields directly instead.
*/
public updateWithContext(spanContext: SpanContext): this {
// eslint-disable-next-line deprecation/deprecation
this.data = spanContext.data || {};
this._name = spanContext.name;
this._endTime = spanContext.endTimestamp;
this._attributes = { ...this._attributes, [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op };
this._parentSpanId = spanContext.parentSpanId;
this._sampled = spanContext.sampled;
this._spanId = spanContext.spanId || this._spanId;
this._startTime = spanContext.startTimestamp || this._startTime;
this._status = spanContext.status;
// eslint-disable-next-line deprecation/deprecation
this.tags = spanContext.tags || {};
this._traceId = spanContext.traceId || this._traceId;

return this;
}

/**
* @inheritDoc
*
Expand Down
13 changes: 0 additions & 13 deletions packages/core/src/tracing/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,6 @@ export class Transaction extends SentrySpan implements TransactionInterface {
});
}

/**
* @inheritDoc
*/
public updateWithContext(transactionContext: TransactionContext): this {
// eslint-disable-next-line deprecation/deprecation
super.updateWithContext(transactionContext);

this._name = transactionContext.name || '';
this._trimEnd = transactionContext.trimEnd;

return this;
}

/**
* @inheritdoc
*
Expand Down
6 changes: 0 additions & 6 deletions packages/types/src/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,6 @@ export interface Span extends Omit<SpanContext, 'name' | 'op' | 'status' | 'orig
*/
toContext(): SpanContext;

/**
* Updates the current span with a new `SpanContext`.
* @deprecated Update the fields directly instead.
*/
updateWithContext(spanContext: SpanContext): this;

/**
* Convert the object to JSON for w. spans array info only.
* @deprecated Use `spanToTraceContext()` util function instead.
Expand Down
6 changes: 0 additions & 6 deletions packages/types/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@ export interface Transaction extends Omit<TransactionContext, 'name' | 'op'>, Sp
*/
toContext(): TransactionContext;

/**
* Updates the current transaction with a new `TransactionContext`.
* @deprecated Update the fields directly instead.
*/
updateWithContext(transactionContext: TransactionContext): this;

/**
* Set metadata for this transaction.
* @deprecated Use attributes or store data on the scope instead.
Expand Down

0 comments on commit 8ed3598

Please sign in to comment.