-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Conversation
// todo: url not yet parametrized | ||
expect(transactionEvent.transaction).toBe('GET /test-param/1234'); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
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\//)) { |
There was a problem hiding this comment.
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.
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:

After:
