Skip to content

Commit

Permalink
[v7] feat: Delete deprecated startSpan and child methods (#4849)
Browse files Browse the repository at this point in the history
Remove deprecated methods `startSpan` and `child`.

These deprecated methods were removed in favour of `span.startChild`.
  • Loading branch information
AbhiPrasad authored and Lms24 committed Apr 26, 2022
1 parent d79582d commit 589426d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 33 deletions.
9 changes: 0 additions & 9 deletions packages/hub/src/hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import {
Primitive,
SessionContext,
Severity,
Span,
SpanContext,
Transaction,
TransactionContext,
User,
Expand Down Expand Up @@ -385,13 +383,6 @@ export class Hub implements HubInterface {
}
}

/**
* @inheritDoc
*/
public startSpan(context: SpanContext): Span {
return this._callExtensionMethod('startSpan', context);
}

/**
* @inheritDoc
*/
Expand Down
10 changes: 0 additions & 10 deletions packages/tracing/src/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,6 @@ export class Span implements SpanInterface {
}
}

/**
* @inheritDoc
* @deprecated
*/
public child(
spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,
): Span {
return this.startChild(spanContext);
}

/**
* @inheritDoc
*/
Expand Down
6 changes: 0 additions & 6 deletions packages/types/src/hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Primitive } from './misc';
import { Scope } from './scope';
import { Session, SessionContext } from './session';
import { Severity } from './severity';
import { Span, SpanContext } from './span';
import { CustomSamplingContext, Transaction, TransactionContext } from './transaction';
import { User } from './user';

Expand Down Expand Up @@ -180,11 +179,6 @@ export interface Hub {
/** Returns all trace headers that are currently on the top scope. */
traceHeaders(): { [key: string]: string };

/**
* @deprecated No longer does anything. Use use {@link Transaction.startChild} instead.
*/
startSpan(context: SpanContext): Span;

/**
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
*
Expand Down
8 changes: 0 additions & 8 deletions packages/types/src/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@ export interface Span extends SpanContext {
*/
setHttpStatus(httpStatus: number): this;

/**
* Use {@link startChild}
* @deprecated
*/
child(
spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,
): Span;

/**
* Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.
* Also the `sampled` decision will be inherited.
Expand Down

0 comments on commit 589426d

Please sign in to comment.