Skip to content

Nezteb/telemetry-driven-development

Repository files navigation

Telemetry-Driven Development

Description

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.

Command Reference

# 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

Timeline / Context

About

My ElixirConf US 2025 talk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published