-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Allow Custom webVitals
Endpoint in performance-relayer.ts
#18907
Comments
We intentionally designed this in such a way that it is code eliminated when unused. Exposing this as a public API would prevent us from iterating on it in the future, as we'd need to keep semver-compliance. Any custom analytics reporting should be introduced via There is nothing we do that you cannot do with the above method. Plus, you'll be able to send things in the exact shape you want (or ignore TTFB, etc)! |
@Timer that makes a great deal of sense, thanks for your response 👍 |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Feature request
This feature request is to allow for a custom URL in the
vitalsUrl
in performance-relayer.tsIs your feature request related to a problem? Please describe.
The use case for this is to aggregate the
webVitals
from NextJS in any third-party tool using the efficient code path already present in the NextJS framework.Describe the solution you'd like
An ideal solution would be to allow the URL to be set in the
next.config.js
so that it can be statically configured before the build.Describe alternatives you've considered
Alternative 1
You can alternatively just engage analytics and monkey-patch through webpack:
Alternative 2
You can follow the steps in https://nextjs.org/docs/advanced-features/measuring-performance to set up a custom implementation. This seems suboptimal given the best practices baked into performance-relayer.ts
Additional context
N/A
Thanks, I would of course understand if this is to remain a private API to allow for feature development.
The text was updated successfully, but these errors were encountered: