Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
The goal of this guide is to teach you how to instrument your Elixir application so that when you look into it it's no longer a black box. To help you with this task I've created a demo application that you can find out in this GitHub repository. It's a very simple Phoenix API that interacts with a Postgres database and an external HTTP API.
For this we'll use opentelemetry_phoenix.
Just like the previous step, after installation of opentelemetry_ecto simply add this line before your top-level supervisor starts. (make sure you replace :blog by your application name)
Last but not least, external API calls are also very common so we should also track them. Again, install the required dependency, opentelementry_tesla and initialize it with the following line. OpentelemetryTesla.setup()
In case there is the need to instrument specific zones of your code, that's also possible using open_telemetry_decorator library. It's simple as adding this dependency to your application and add two more lines of code.