View Source ErrorTracker.Integrations.Phoenix (ErrorTracker v0.3.0)

Integration with Phoenix applications.

How to use it

It is a plug and play integration: as long as you have Phoenix installed the ErrorTracker will receive and store the errors as they are reported.

It also collects the exceptions that raise on your LiveView modules.

How it works

It works using Phoenix's Telemetry events, so you don't need to modify anything on your application.

Errors on the Endpoint

This integration only catches errors that raise after the requests hits your Router. That means that an exception on a plug defined on your Endpoint will not be reported.

If you want to also catch those errors, we recommend you to set up the ErrorTracker.Integrations.Plug integration too.

Default context

For errors that are reported when executing regular HTTP requests (the ones that go to Controllers), the context added by default is the same that you can find on the ErrorTracker.Integrations.Plug integration.

As for exceptions generated in LiveView processes, we collect some special information on the context:

  • live_view.view: the LiveView module itself,

  • live_view.uri: last URI that loaded the LiveView (available when the handle_params function is invoked).

  • live_view.params: the params received by the LiveView (available when the handle_params function is invoked).

  • live_view.event: last event received by the LiveView (available when the handle_event function is invoked).

  • live_view.event_params: last event params received by the LiveView (available when the handle_event function is invoked).