Collector.Plug (collector v0.1.1)

Copy Markdown

Attaches the current request to any error reported while handling it.

# lib/my_app_web/endpoint.ex
plug Collector.Plug

Credentials (cookie, authorization and the like) are never sent.

It also forgets the user set by Collector.set_user/1 for the previous request: on a keep-alive connection one process serves many requests, and a logged-out one mustn't report the last user.