phoenix_profiler icon indicating copy to clipboard operation
phoenix_profiler copied to clipboard

use PhoenixProfiler on the Endpoint

Open mcrumm opened this issue 2 years ago • 2 comments

mcrumm avatar Mar 03 '22 07:03 mcrumm

@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! :)

mcrumm avatar Mar 04 '22 17:03 mcrumm

@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! :)

mcrumm avatar Mar 11 '22 19:03 mcrumm