phoenix_profiler
phoenix_profiler copied to clipboard
use PhoenixProfiler on the Endpoint
@leandrocp You are correct– the toolbar cannot render the error for its own request because the Phoenix.Endpoint.RenderErrors
module takes over sending the response. To account for this, the private late_collect/3
function on the profiler endpoint is invoked after the response has been sent, which allows us to collect additional information about the request to be viewed later.
I think you are also correct about the race condition tho– we are racing the late write to ETS and that's why we are getting back profile data without the exception.
But now I think I have an idea of how to get the tests passing, stand by! :)
@leandrocp Thanks for testing it out! Yes, things seem to work fine but the Heisenbugs are forcing me to question some earlier decisions. I just had a nice chat with @elbow-jason who gave me some ideas that I hope to experiment with soon! :)