Skip to content
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

feat(nuxt): Filter out Nuxt build assets #13148

Merged
merged 6 commits into from
Aug 1, 2024
Merged

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Aug 1, 2024

Filtering out events of the _nuxt buildAssetDir. Next step would be to change the regex based on the folder name (as this could be changed in the nuxt config during build time - but probably doesn't happen too often).

Also added some unit tests for the server-side of the SDK.

Before:
image

After:
image

@s1gr1d s1gr1d requested review from a team, stephanie-anderson, AbhiPrasad, lforst and Lms24 and removed request for a team and stephanie-anderson August 1, 2024 07:54
Comment on lines 44 to 45
// todo: url not yet parametrized
expect(transactionEvent.transaction).toBe('GET /test-param/1234');
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure why this is the case here - it shows /test-param/* in the UI but 1234 here. Relay seems to pick that up, but shouldn't the SDK as well?

Copy link
Member

Choose a reason for hiding this comment

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

Isn't that because we aren't hitting relay, but our tunnel?

@s1gr1d s1gr1d requested a review from mydea August 1, 2024 08:12
if (event.type === 'transaction') {
// Filter out transactions for Nuxt build assets
// This regex matches the default path to the nuxt-generated build assets (`_nuxt`).
if (event.transaction?.match(/^GET \/_nuxt\//)) {
Copy link
Member

Choose a reason for hiding this comment

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

l: Maybe let's add a small TODO comment here to dynamically match this path based on the nuxt build output folder so that we don't forget.

@s1gr1d s1gr1d merged commit 29f070f into develop Aug 1, 2024
97 checks passed
@s1gr1d s1gr1d deleted the sig/filter-nuxt-events branch August 1, 2024 10:38
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