Tracking requests through Remix callbacks #3960
christopherboyd
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We perform a few common actions on every HTTP request, such as collecting and logging perf metrics. To do so, it seems like it would be nice to have a stable request identifier passed to each Remix callback.
Our project currently runs code per request in four places: route loader, route action, handleRequest in entry.server.tsx and handleDataRequest in entry.server.tsx. Unless I am missing an existing field, I think it would be helpful if:
or
Users can currently use the server code wrapping Remix to handle per request actions, but that requires duplicate code per server host (Express, AWS, Vercel, etc). I would be happy to propose a pull request for either of the methods above if one sounded like a good addition.
Beta Was this translation helpful? Give feedback.
All reactions