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
1 change: 1 addition & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ In v8, the Span class is heavily reworked. The following properties & methods ar
- `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.
- `transaction.setContext()`: Set context on the surrounding scope instead.

## Deprecate `pushScope` & `popScope` in favor of `withScope`
Expand Down
7 changes: 7 additions & 0 deletions packages/core/src/tracing/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ export class Span implements SpanInterface {

/**
* The instrumenter that created this span.
*
* TODO (v8): This can probably be replaced by an `instanceOf` check of the span class.
* the instrumenter can only be sentry or otel so we can check the span instance
* to verify which one it is and remove this field entirely.
*
* @deprecated This field will be removed.
*/
public instrumenter: Instrumenter;

Expand Down Expand Up @@ -142,6 +148,7 @@ export class Span implements SpanInterface {
// eslint-disable-next-line deprecation/deprecation
this.data = spanContext.data ? { ...spanContext.data } : {};
this._attributes = spanContext.attributes ? { ...spanContext.attributes } : {};
// eslint-disable-next-line deprecation/deprecation
this.instrumenter = spanContext.instrumenter || 'sentry';
this.origin = spanContext.origin || 'manual';
// eslint-disable-next-line deprecation/deprecation
Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ export interface Span extends SpanContext {

/**
* The instrumenter that created this span.
*
* @deprecated this field will be removed.
*/
instrumenter: Instrumenter;

Expand Down