Skip to content

Commit d2bd4c5

Browse files
authored
chore(tracing): Clean-up work from removing startSpan (#3075)
1 parent 1353c13 commit d2bd4c5

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

packages/tracing/test/span.test.ts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -229,35 +229,6 @@ describe('Span', () => {
229229
expect(spy).not.toHaveBeenCalled();
230230
});
231231

232-
test('mixing hub.startSpan(transaction) + span.startChild + maxSpans', () => {
233-
const _hub = new Hub(
234-
new BrowserClient({
235-
_experiments: { maxSpans: 2 },
236-
tracesSampleRate: 1,
237-
}),
238-
);
239-
const spy = jest.spyOn(_hub as any, 'captureEvent') as any;
240-
241-
const transaction = _hub.startTransaction({ name: 'test' });
242-
const childSpanOne = transaction.startChild({ op: '1' });
243-
childSpanOne.finish();
244-
245-
_hub.configureScope(scope => {
246-
scope.setSpan(transaction);
247-
});
248-
249-
const spanTwo = transaction.startChild({ op: '2' });
250-
spanTwo.finish();
251-
252-
const spanThree = transaction.startChild({ op: '3' });
253-
spanThree.finish();
254-
255-
transaction.finish();
256-
257-
expect(spy).toHaveBeenCalled();
258-
expect(spy.mock.calls[0][0].spans).toHaveLength(2);
259-
});
260-
261232
test('tree structure of spans should be correct when mixing it with span on scope', () => {
262233
const spy = jest.spyOn(hub as any, 'captureEvent') as any;
263234

packages/types/src/hub.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,7 @@ export interface Hub {
176176
traceHeaders(): { [key: string]: string };
177177

178178
/**
179-
* Starts a new `Span` and returns it. If there is a `Span` on the `Scope`,
180-
* the new `Span` will be a child of the existing `Span`.
181-
*
182-
* @param context Properties of the new `Span`.
179+
* @deprecated No longer does anything. Use use {@link Transaction.startChild} instead.
183180
*/
184181
startSpan(context: SpanContext): Span;
185182

0 commit comments

Comments
 (0)