Skip to content

feat(v8): Remove span.origin #10753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2024
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
18 changes: 0 additions & 18 deletions packages/core/src/tracing/sentrySpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,24 +315,6 @@ export class SentrySpan implements SpanInterface {
this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, op);
}

/**
* The origin of the span, giving context about what created the span.
*
* @deprecated Use `spanToJSON().origin` to read the origin instead.
*/
public get origin(): SpanOrigin | undefined {
return this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined;
}

/**
* The origin of the span, giving context about what created the span.
*
* @deprecated Use `startSpan()` functions to set the origin instead.
*/
public set origin(origin: SpanOrigin | undefined) {
this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);
}

/* eslint-enable @typescript-eslint/member-ordering */

/** @inheritdoc */
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-node/src/utils/spanData.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable deprecation/deprecation */
import { Transaction } from '@sentry/core';
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, Transaction } from '@sentry/core';
import type { Context, SpanOrigin } from '@sentry/types';

import { getSentrySpan } from './spanMap';
Expand Down Expand Up @@ -46,7 +46,7 @@ export function addOtelSpanData(
}

if (origin) {
sentrySpan.origin = origin;
sentrySpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);
}

if (sentrySpan instanceof Transaction) {
Expand Down
7 changes: 0 additions & 7 deletions packages/types/src/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,6 @@ export interface Span extends Omit<SpanContext, 'name' | 'op' | 'status' | 'orig
*/
status?: string | undefined;

/**
* The origin of the span, giving context about what created the span.
*
* @deprecated Use `startSpan` function to set and `spanToJSON(span).origin` to read the origin instead.
*/
origin?: SpanOrigin | undefined;

/**
* Get context data for this span.
* This includes the spanId & the traceId.
Expand Down