Telemetry is an invaluable part of any production deployment, but have you ever used it for local debugging or when writing unit/integration tests? While logging is a form of telemetry that many developers are familiar with, other tools like tracing and metrics have historically been production-only concerns. Even then, how often are your traces and metrics really being utilized? Developers should understand that these same tools that give you confidence in production can also help you during development and testing.
Key takeaways for the audience: Telemetry is more than just logs. It's incredibly flexible and can be used for more than just operating a production deployment. You can also use telemetry to debug an application locally during development or even use it to unit/integration test entire parts of your system.
Target audience: Developers with basic Elixir proficiency that are also familiar with high-level telemetry concepts (logs, tracing, metrics). Experience with
:telemetry
(hexdocs.pm/telemetry) and or OpenTelemetry (opentelemetry.io) is nice to have.
# https://hexdocs.pm/phoenix/1.8.0/Mix.Tasks.Phx.New.html
mix archive.install hex phx_new 1.8.0
# https://hexdocs.pm/phoenix/1.8.0/Mix.Tasks.Phx.New.html
mix phx.new \
--binary-id \
--no-mailer \
--no-assets \
--module TDD \
.
mix release.init
mix phx.gen.release --docker
# The Dockerfile + .dockerignore created by this need several tweaks because we used `--no-assets`.
docker compose up --detach \
--remove-orphans \
--renew-anon-volumes \
--force-recreate \
--build
- January 19, 2022: ElixirConf EU 2021 - "Monitoring Elixir With OpenTelemetry"
- June 22, 2022: Code BEAM V America 21 - "BEAM + Prometheus + Grafana = Observability Heaven"
- November 14, 2022: Fly.io Blog - "Elixir, OpenTelemetry, and the Infamous N+1"
- November 3, 2023: Cory O'Daniel Tweet - "Webinar: Test driven development with OpenTelemetry"
- February 15, 2024: Substack - "All you need is Wide Events, not "Metrics, Logs and Traces'"
- February 17, 2024: Blog Post - "Observability for Phoenix using the Grafana Stack in Dev"
- April 4, 2024: Cory O'Daniel DMs me a link to tracetest
- April 16, 2024: ElixirConf EU 23 - "Using OpenTelemetry To Troubleshoot & Monitor Production Applications"
- December 11, 2024: Webinar - "Instrumenting Erlang and Elixir code with open telemetry"
- December 12, 2024: Elixir Wizards Podcast - "Telemetry & Observability for Elixir Apps"
- February 6, 2025: LostKobrakai on testing emitted telemetry events
- February 11, 2025: Initial wildfires local telemetry demo
- March 24, 2025: German Velasco asks about tracing in production
- April 27, 2025: ElixirConf US 2024 - "OpenTelemetry: From Desire to Dashboard"
- May 6, 2025: David Bernheisel posts about Elixir pains working with OpenTelemetry
- June 23, 2025: Lars Wikman asks about opinions on Grafana
- June 23, 2025: Łukasz Niemier mentions OpenTelemetry + DuckDB
- June 30, 2025: Jacob Swanner's proposed telemetry talk