Skip to content

test(browser): Add integration tests for startTransaction #4343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 22, 2021

Conversation

onurtemizkan
Copy link
Collaborator

Part of: #4333

@github-actions
Copy link
Contributor

github-actions bot commented Dec 21, 2021

size-limit report

Path Base Size (33d69d5) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 19.72 KB 19.72 KB +0.03% 🔺
@sentry/browser - CDN Bundle (minified) 62.76 KB 62.77 KB +0.01% 🔺
@sentry/browser - Webpack 22.25 KB 22.25 KB 0%
@sentry/browser - Webpack - gzip = false 75.92 KB 75.92 KB 0%
@sentry/react - Webpack 22.29 KB 22.29 KB 0%
@sentry/nextjs Client - Webpack 46.41 KB 46.41 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.37 KB 28.38 KB +0.02% 🔺

@onurtemizkan onurtemizkan changed the title Add integration tests for startTransaction test(browser): Add integration tests for startTransaction Dec 21, 2021
@onurtemizkan onurtemizkan force-pushed the onur/public-api-tests-start-transaction branch from 7a3174a to a912187 Compare December 21, 2021 14:35
@onurtemizkan onurtemizkan force-pushed the onur/public-api-tests-start-transaction branch from a912187 to e5cb0d2 Compare December 21, 2021 14:39
@smeubank smeubank added this to the Release Stability milestone Dec 21, 2021
Comment on lines 18 to 19
const eventData = await getSentryTransactionRequest(page, url);
const transaction = eventData[2] as Event;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be returning the correct type from the helpers.

eventData[0] and eventData[1] are probably sessions. We prob wanna filter those out in the helper's return value

const request = (await Promise.all([page.goto(url || '#'), waitForSentryRequest(page, 'transaction')]))[1];

// https://develop.sentry.dev/sdk/envelopes/
const envelope = (request?.postData() as string) || '';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we try catch wrap this logic and throw and error accordingly?

@AbhiPrasad AbhiPrasad merged commit 539b026 into master Dec 22, 2021
@AbhiPrasad AbhiPrasad deleted the onur/public-api-tests-start-transaction branch December 22, 2021 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants