Skip to content

Commit d2fe512

Browse files
AbhiPrasadlobsterkatie
authored andcommitted
[v7] feat: Delete deprecated startSpan and child methods (#4849)
Remove deprecated methods `startSpan` and `child`. These deprecated methods were removed in favour of `span.startChild`.
1 parent 7e50a94 commit d2fe512

File tree

4 files changed

+0
-33
lines changed

4 files changed

+0
-33
lines changed

packages/hub/src/hub.ts

-9
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import {
1414
Primitive,
1515
SessionContext,
1616
Severity,
17-
Span,
18-
SpanContext,
1917
Transaction,
2018
TransactionContext,
2119
User,
@@ -385,13 +383,6 @@ export class Hub implements HubInterface {
385383
}
386384
}
387385

388-
/**
389-
* @inheritDoc
390-
*/
391-
public startSpan(context: SpanContext): Span {
392-
return this._callExtensionMethod('startSpan', context);
393-
}
394-
395386
/**
396387
* @inheritDoc
397388
*/

packages/tracing/src/span.ts

-10
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,6 @@ export class Span implements SpanInterface {
149149
}
150150
}
151151

152-
/**
153-
* @inheritDoc
154-
* @deprecated
155-
*/
156-
public child(
157-
spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,
158-
): Span {
159-
return this.startChild(spanContext);
160-
}
161-
162152
/**
163153
* @inheritDoc
164154
*/

packages/types/src/hub.ts

-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { Primitive } from './misc';
77
import { Scope } from './scope';
88
import { Session, SessionContext } from './session';
99
import { Severity } from './severity';
10-
import { Span, SpanContext } from './span';
1110
import { CustomSamplingContext, Transaction, TransactionContext } from './transaction';
1211
import { User } from './user';
1312

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

183-
/**
184-
* @deprecated No longer does anything. Use use {@link Transaction.startChild} instead.
185-
*/
186-
startSpan(context: SpanContext): Span;
187-
188182
/**
189183
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
190184
*

packages/types/src/span.ts

-8
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,6 @@ export interface Span extends SpanContext {
128128
*/
129129
setHttpStatus(httpStatus: number): this;
130130

131-
/**
132-
* Use {@link startChild}
133-
* @deprecated
134-
*/
135-
child(
136-
spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,
137-
): Span;
138-
139131
/**
140132
* Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.
141133
* Also the `sampled` decision will be inherited.

0 commit comments

Comments
 (0)