My front end currently uses websockets to issue GraphQL API queries to our server, and I was wondering what would be the best way to calculate the total request time for metric tracking.
For context, we are using Absinthe and Phoenix, and I know Absinthe outputs the response time in the debug logs. I wrote a Plugin for Absinthe that captures the diff between before and after resolution, but I believe this only captures the time it takes to process the Absinthe doc + data.
I know with Phoenix, you can use a Plug to inject a time and use register_before_send to grab the response time.
Is there any way to do the exact same thing, but when a user is connected via a websocket?
Thanks