Monitor and observe Elixir Phoenix apps.
Instrumenting your Erlang Elixir Phoenix application to generate traces, logs, and metrics is a powerful way to gain deep insights into its behavior and performance. For example, to get a clearer picture of your Phoenix apps and the database statements generated through Ecto. By adding instrumentation, you enable your application to emit valuable data that can be used for monitoring, troubleshooting, and optimization.
Dash0 supports automatic instrumentation of Phoenix applications through OpenTelemetry's open-source and vendor-agnostic helper functions.
This guide assumes you are having a Phoenix application running on Erlang using the Cowboy2 adapter:
Add the required :tls_certificate_check
application to your mix.exs
file.
Then add the following dependencies to your mix.exs
file.
To send data now to Dash0, you need to configure the exporter in your config.exs
:
In your application start function (for example in lib/myapp/application.ex
) add the required setup calls:
We also recommend that you configure the service name by overriding the OTEL_SERVICE_NAME
environment variable or setting it in config.exs
: