Can you add request processing time and other info to Phoenix logs?

Hello All,

Do phoenix have standard request/response log that includes also processing time and maybe can be also have facts per endpoint or route so that performance bottlenecks or exceptions can be easier to view for monitoring teams? Is this something can be added to the live dashboard?

Thanks

You might want to look at telemetry for that.

If you generated your phoenix project with mix phx.new my_app, then you should have the file: lib/my_app_web/telemetry.ex. There you can notice the potential phoenix measurements and then customize them in periodic_measurements function to receive them periodically.

4 Likes

One more query please , how do you monitor usually the health of your APIs with phoenix and business end points? the idea is to have a dashboard with some graphs , screens and maybe notifications for the different applications in order to make it easier for Ops teams responsible about monitoring

There are countless ways to do that, starting from commercial solutions like Datadog, Sentry, etc. to self-hosted solutions like grafana or any alternatives + time-series databases.

1 Like

Sentry seems great with many good features but Elixir/Phoenix seems not supported :smile:
It seems we have quite many tools out of the box we did not create enough demand for them to support elixir/phoenix :wink:

https://hexdocs.pm/sentry/Sentry.html

1 Like

Thanks I missed it as it was not listed on first page dropdown supported technologies

1 Like