Skip to content

Commit ca24b19

Browse files
committed
feat(core): Deprecate Span.instrumenter
1 parent 2c0c99e commit ca24b19

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/core/src/tracing/span.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ export class Span implements SpanInterface {
110110

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

@@ -142,6 +148,7 @@ export class Span implements SpanInterface {
142148
// eslint-disable-next-line deprecation/deprecation
143149
this.data = spanContext.data ? { ...spanContext.data } : {};
144150
this._attributes = spanContext.attributes ? { ...spanContext.attributes } : {};
151+
// eslint-disable-next-line deprecation/deprecation
145152
this.instrumenter = spanContext.instrumenter || 'sentry';
146153
this.origin = spanContext.origin || 'manual';
147154
// eslint-disable-next-line deprecation/deprecation

packages/types/src/span.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ export interface Span extends SpanContext {
221221

222222
/**
223223
* The instrumenter that created this span.
224+
*
225+
* @deprecated this field will be removed.
224226
*/
225227
instrumenter: Instrumenter;
226228

0 commit comments

Comments
 (0)