diff --git a/MIGRATION.md b/MIGRATION.md index c1dc5b4415ae..0fb51fd6c4c7 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -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` diff --git a/packages/core/src/tracing/span.ts b/packages/core/src/tracing/span.ts index 10a4d97efa08..c3cd71e87699 100644 --- a/packages/core/src/tracing/span.ts +++ b/packages/core/src/tracing/span.ts @@ -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; @@ -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 diff --git a/packages/types/src/span.ts b/packages/types/src/span.ts index 3f54322886bb..662cfb57a155 100644 --- a/packages/types/src/span.ts +++ b/packages/types/src/span.ts @@ -221,6 +221,8 @@ export interface Span extends SpanContext { /** * The instrumenter that created this span. + * + * @deprecated this field will be removed. */ instrumenter: Instrumenter;