Skip to content

Commit 4f54d02

Browse files
committed
more cleanup
1 parent 91b0d28 commit 4f54d02

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

dev-packages/e2e-tests/test-applications/sveltekit/test/performance.server.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ test('server pageload request span has nested request span', async ({ page }) =>
1212
const serverTxnEvent = await serverTxnEventPromise;
1313
const spans = serverTxnEvent.spans;
1414

15-
const outerHttpServerSpan = spans?.find(span => span.op === 'http.server' && span.description === 'GET /server-load-fetch');
16-
const innerHttpServerSpan = spans?.find(span => span.op === 'http.server' && span.description === 'GET /api/users');
17-
1815
expect(serverTxnEvent).toMatchObject({
1916
transaction: 'GET /server-load-fetch',
2017
tags: { runtime: 'node' },
@@ -29,6 +26,9 @@ test('server pageload request span has nested request span', async ({ page }) =>
2926
});
3027

3128
expect(spans).toHaveLength(3);
32-
expect(outerHttpServerSpan).toBeDefined();
33-
expect(innerHttpServerSpan).toBeDefined();
29+
30+
expect(spans).toEqual(expect.arrayContaining([
31+
expect.objectContaining({ op: 'http.server', description: 'GET /server-load-fetch' }),
32+
expect.objectContaining({ op: 'http.server', description: 'GET /api/users' }),
33+
]))
3434
});

packages/core/src/tracing/trace.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ function createChildSpanOrTransaction(
250250
// eslint-disable-next-line deprecation/deprecation
251251
span = parentSpan.startChild(spanContext);
252252
addChildSpanToSpan(parentSpan, span);
253-
254253
} else if (parentSpan) {
255254
// If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope
256255
const dsc = getDynamicSamplingContextFromSpan(parentSpan);

0 commit comments

Comments
 (0)