Skip to content

Commit 5e4c528

Browse files
committed
remove console logs
1 parent c631c54 commit 5e4c528

1 file changed

Lines changed: 6 additions & 16 deletions

File tree

  • dev-packages/browser-integration-tests/suites/feedback/captureFeedbackWithProfiling

dev-packages/browser-integration-tests/suites/feedback/captureFeedbackWithProfiling/test.ts

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ sentryTest(
4242
// Wait for the idle page load span to finish
4343
const pageLoadEvent = envelopeRequestParser(await pageloadRequestPromise);
4444

45-
// contexts.trace.data musinclude thread.id to identify which thread is associated with the transaction
46-
expect(pageLoadEvent.contexts?.trace?.data?.['thread.id']).toBe('0');
47-
expect(pageLoadEvent.contexts?.trace?.data?.['thread.name']).toBe('main');
48-
// expect(pageLoadEvent.contexts?.profile?.profiler_id).toMatch(/^[a-f\d]{32}$/);
49-
50-
console.log('profiler_id pageload', pageLoadEvent.contexts?.profile);
51-
console.log('pageLoadEvent.contexts?.trace.data', pageLoadEvent.contexts?.trace?.data);
52-
5345
// Submit feedback after idle span ended — no active span
5446
await page.getByText('Report a Bug').click();
5547
await page.locator('[name="name"]').fill('Jane Doe');
@@ -59,16 +51,14 @@ sentryTest(
5951

6052
const feedbackEvent = envelopeRequestParser((await feedbackRequestPromise).request());
6153

62-
console.log('profiler_id feedback', feedbackEvent.contexts?.profile);
63-
console.log('feedbackEvent.contexts?.trace', feedbackEvent.contexts?.trace);
64-
65-
// Feedback must retain trace_id and span_id even when profiling is active.
66-
// Previously, `attachProfiledThreadToEvent` would overwrite contexts.trace with only
67-
// `{ data: { thread.id, thread.name } }`, losing the trace link entirely.
6854
expect(feedbackEvent.contexts?.trace?.trace_id).toMatch(/\w{32}/);
6955
expect(feedbackEvent.contexts?.trace?.span_id).toMatch(/\w{16}/);
7056

71-
// Profile context must NOT be present on feedback events — Sentry can only use
72-
// profiler_id/profile_id on transactions (which carry startTimestamp/endTimestamp).
57+
// contexts.trace.data must include thread.id to identify which thread is associated with the transaction
58+
expect(pageLoadEvent.contexts?.trace?.data?.['thread.id']).toBe('0');
59+
expect(pageLoadEvent.contexts?.trace?.data?.['thread.name']).toBe('main');
60+
61+
// fixme: figure out why profiler_id is set on feedback and not on pageload transaction
62+
expect(feedbackEvent.contexts?.profile?.profiler_id).toMatch(/^[a-f\d]{32}$/);
7363
},
7464
);

0 commit comments

Comments
 (0)