Since we are nearing Phoenix v1.5 release, I think we should get this in before so we can apply similar changes to Phoenix.
It is very similar to @bryannaegele's PR with some changes:
The conn is given to all events - although exception emits a stale connection
I have renamed the event to [:plug_adapter, :call, :start]. This is based on our previous discussions. Since I want this event to be generic in regards to the adapter, then I think it is best to name it based on Plug's contract. In other words, this event is triggered when the adapter calls the underlying Plug. For this reason, I am also passing the called plug as metadata.
Please review it ASAP so I can apply these changes to Phoenix.
Since we are nearing Phoenix v1.5 release, I think we should get this in before so we can apply similar changes to Phoenix.
It is very similar to @bryannaegele's PR with some changes:
The
conn
is given to all events - although exception emits a stale connectionI have renamed the event to
[:plug_adapter, :call, :start]
. This is based on our previous discussions. Since I want this event to be generic in regards to the adapter, then I think it is best to name it based on Plug's contract. In other words, this event is triggered when the adapter calls the underlying Plug. For this reason, I am also passing the called plug as metadata.Please review it ASAP so I can apply these changes to Phoenix.
/cc @GregMefford @binaryseed @bryannaegele