Skip to content

Commit 0433f2e

Browse files
committed
feat(v8): Remove span.origin (#10753)
ref #10677 Removes `span.origin` as a getter.
1 parent c70eeab commit 0433f2e

File tree

3 files changed

+2
-27
lines changed

3 files changed

+2
-27
lines changed

packages/core/src/tracing/sentrySpan.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -315,24 +315,6 @@ export class SentrySpan implements SpanInterface {
315315
this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, op);
316316
}
317317

318-
/**
319-
* The origin of the span, giving context about what created the span.
320-
*
321-
* @deprecated Use `spanToJSON().origin` to read the origin instead.
322-
*/
323-
public get origin(): SpanOrigin | undefined {
324-
return this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined;
325-
}
326-
327-
/**
328-
* The origin of the span, giving context about what created the span.
329-
*
330-
* @deprecated Use `startSpan()` functions to set the origin instead.
331-
*/
332-
public set origin(origin: SpanOrigin | undefined) {
333-
this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);
334-
}
335-
336318
/* eslint-enable @typescript-eslint/member-ordering */
337319

338320
/** @inheritdoc */

packages/opentelemetry-node/src/utils/spanData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable deprecation/deprecation */
2-
import { Transaction } from '@sentry/core';
2+
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, Transaction } from '@sentry/core';
33
import type { Context, SpanOrigin } from '@sentry/types';
44

55
import { getSentrySpan } from './spanMap';
@@ -46,7 +46,7 @@ export function addOtelSpanData(
4646
}
4747

4848
if (origin) {
49-
sentrySpan.origin = origin;
49+
sentrySpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);
5050
}
5151

5252
if (sentrySpan instanceof Transaction) {

packages/types/src/span.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,6 @@ export interface Span extends Omit<SpanContext, 'name' | 'op' | 'status' | 'orig
260260
*/
261261
status?: string | undefined;
262262

263-
/**
264-
* The origin of the span, giving context about what created the span.
265-
*
266-
* @deprecated Use `startSpan` function to set and `spanToJSON(span).origin` to read the origin instead.
267-
*/
268-
origin?: SpanOrigin | undefined;
269-
270263
/**
271264
* Get context data for this span.
272265
* This includes the spanId & the traceId.

0 commit comments

Comments
 (0)