Skip to content

test(remix): Add server-side instrumentation integration tests. #5538

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 4 commits into from
Aug 9, 2022

Conversation

onurtemizkan
Copy link
Collaborator

Adds a basic set of tests to ensure loader, action and documentRequest functions are properly instrumented.

Also, switches node-integration-test utilities to use axios to simulate requests, instead of http package, to easily switch between post and get requests.

@onurtemizkan onurtemizkan self-assigned this Aug 8, 2022
@onurtemizkan onurtemizkan added the Package: remix Issues related to the Sentry Remix SDK label Aug 8, 2022
@onurtemizkan onurtemizkan added this to the Sentry Remix SDK milestone Aug 8, 2022
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Can we add a test for 5xx responses?

assertSentryTransaction(transaction, {
spans: [
{
description: 'routes/action-json-response/$id',
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 really think about if we can make this name better.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe something like `${action | loader | documentRequest} of ${route}`?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I like that, even if the info is a bit redundant

@onurtemizkan onurtemizkan force-pushed the onur/remix-server-integration-tests branch from 9eebad8 to 3ba64c2 Compare August 9, 2022 09:46
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.38 KB (-0.02% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 59.99 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.96 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 52.88 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 19.73 KB (0%)
@sentry/browser - Webpack (minified) 64.21 KB (0%)
@sentry/react - Webpack (gzipped + minified) 19.75 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 44.16 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 25.79 KB (0%)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.04 KB (-0.01% 🔽)

@onurtemizkan onurtemizkan force-pushed the onur/remix-server-integration-tests branch 7 times, most recently from 4bd95b7 to 12488fa Compare August 9, 2022 11:25
@onurtemizkan onurtemizkan force-pushed the onur/remix-server-integration-tests branch from 12488fa to f29c0f0 Compare August 9, 2022 11:43
@onurtemizkan onurtemizkan requested a review from AbhiPrasad August 9, 2022 11:56
@AbhiPrasad AbhiPrasad merged commit 11bb8ed into master Aug 9, 2022
@AbhiPrasad AbhiPrasad deleted the onur/remix-server-integration-tests branch August 9, 2022 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: remix Issues related to the Sentry Remix SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants