Integrating Elixir with Datadog for Monitoring and Tracing

166
clicks
Integrating Elixir with Datadog for Monitoring and Tracing
Ludwik Bukowski presented at EMPEX LA 2019 on how developers could monitor their Elixir systems using Datadog. He created a sample Phoenix application named 'Impacts Cookbook' for managing recipes. The application features a straightforward interface with functions such as listing, creating, and deleting recipes, and it demonstrates the use of Ecto and Phoenix web interface. Ludwik highlights the use of GraphQL via the Absinthe framework for defining schemas and making queries, which return JSON responses. For the monitoring aspect, Ludwik discusses using the StatsD protocol with the Statix library to send metrics to Datadog. He also covers instrumenting Phoenix with Plugs to record timings and using Elixir's built-in instrumentation for Phoenix controllers and views. For Ecto queries, the presentation details using callbacks to capture timing data and send it to Datadog. The presentation also touches upon the problem of identifying slow API calls, debugging, and using distributed tracing with the Spandex library. The code is instrumented to produce traces with spans for performance analysis, which is shown live during the demonstration. Finally, Ludwik addresses potential issues with tracing, such as the need for sampling in large architectures and the overhead involved. He concludes by mentioning the ongoing efforts in the Elixir community related to the Telemetry project and notes DataDog's responsive support.

© HashMerge 2024