Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,16 @@ In v8, the Span class is heavily reworked. The following properties & methods ar
- `span.name`: Use `spanToJSON(span).description` instead.
- `span.description`: Use `spanToJSON(span).description` instead.
- `span.getDynamicSamplingContext`: Use `getDynamicSamplingContextFromSpan` utility function instead.
- `transaction.setMetadata()`: Use attributes instead, or set data on the scope.
- `transaction.metadata`: Use attributes instead, or set data on the scope.
- `span.tags`: Set tags on the surrounding scope instead, or use attributes.
- `span.data`: Use `spanToJSON(span).data` instead.
- `span.setTag()`: Use `span.setAttribute()` instead or set tags on the surrounding scope.
- `span.setData()`: Use `span.setAttribute()` instead.
- `span.instrumenter` This field was removed and will be replaced internally.
- `span.transaction`: Use `getRootSpan` utility function instead.
- `transaction.setMetadata()`: Use attributes instead, or set data on the scope.
- `transaction.metadata`: Use attributes instead, or set data on the scope.
- `transaction.setContext()`: Set context on the surrounding scope instead.
- `transaction.setName()`: Set the name with `.updateName()` and the source with `.setAttribute()` instead.

## Deprecate `pushScope` & `popScope` in favor of `withScope`

Expand Down
6 changes: 5 additions & 1 deletion packages/core/src/tracing/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,11 @@ export class Span implements SpanInterface {
return this;
}

/** @inheritdoc */
/**
* @inheritdoc
*
* @deprecated Use `.updateName()` instead.
*/
public setName(name: string): void {
this.updateName(name);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tracing/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
/**
* Setter for `name` property, which also sets `source` on the metadata.
*
* @deprecated Use `updateName()` and `setMetadata()` instead.
* @deprecated Use `.updateName()` and `.setAttribute()` instead.
*/
public setName(name: string, source: TransactionMetadata['source'] = 'custom'): void {
this._name = name;
Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export interface Transaction extends TransactionContext, Omit<Span, 'setName' |

/**
* Set the name of the transaction
*
* @deprecated Use `.updateName()` and `.setAttribute()` instead.
*/
setName(name: string, source?: TransactionMetadata['source']): void;

Expand Down