Elixir Integration
Instrument Elixir and Phoenix applications with one Hex package. BEAM VM scheduler metrics, Phoenix request tracing, Ecto query spans, and GenServer call visibility — zero configuration.
How It Works
Add to mix.exs
Add {:tigerops, "~> 0.1"} to your deps list in mix.exs and run mix deps.get. The package bundles the opentelemetry_exporter Hex package and a custom BEAM VM telemetry collector that hooks into :telemetry and :erlang.statistics/1.
Configure the Application
Add TigerOps to your application's supervision tree in application.ex. Set config :tigerops in config/runtime.exs to read your API key from the environment. Phoenix integration is automatic once the supervisor starts.
Set Environment Variables
Export TIGEROPS_API_KEY, TIGEROPS_SERVICE_NAME, and TIGEROPS_ENVIRONMENT. In releases, add these to your runtime.exs System.get_env calls. The TigerOps supervisor reads configuration at startup.
BEAM, Phoenix & Ecto Flow
Within seconds TigerOps receives BEAM scheduler utilization, process counts, Phoenix request traces, Ecto query spans, and GenServer call durations from your Elixir application.
What You Get Out of the Box
BEAM VM Scheduler Metrics
Scheduler utilization per logical core, run queue lengths, process count, atom count, ETS table count, binary memory, and port count — all sampled via :erlang.statistics/1 and :erlang.memory/0 every 15 seconds.
Phoenix Request Tracing
TigerOps attaches to Phoenix.Endpoint telemetry events to create root spans for every HTTP request and LiveView socket event. Route, controller action, status, and plug pipeline timing are all captured.
Ecto Query Spans
Every Ecto.Repo query emits a child span with normalized SQL, query time, decode time, and queue time via the Ecto telemetry events. Slow queries are flagged and N+1 patterns are detected across requests.
GenServer Call Tracing
Wrap GenServer calls and casts with TigerOps.Span.genserver/2 to create child spans that capture the module name, function, and execution time. Process mailbox queue depth is tracked as a span attribute.
Oban & Broadway Workers
Oban job execution traces with queue name, worker module, attempt count, and error details. Broadway pipeline metrics including throughput, batch sizes, and processor concurrency via telemetry event hooks.
Distributed Trace Propagation
W3C TraceContext context propagation across Phoenix.PubSub messages, Finch HTTP client calls, and distributed Erlang node boundaries. Multi-node clusters maintain complete trace continuity.
Install & Initialize
One Hex dependency. One config block. Full BEAM observability.
# mix.exs
defp deps do
[
{:tigerops, "~> 0.1"},
{:phoenix, "~> 1.7"},
{:ecto_sql, "~> 3.10"},
# ...
]
end
# Run
mix deps.get
# config/runtime.exs
import Config
config :tigerops,
api_key: System.get_env("TIGEROPS_API_KEY"),
service_name: System.get_env("TIGEROPS_SERVICE_NAME", "my-phoenix-app"),
environment: System.get_env("TIGEROPS_ENVIRONMENT", "production"),
beam_metrics: true, # BEAM VM scheduler metrics
ecto_repos: [MyApp.Repo]
# application.ex — add TigerOps to supervision tree
def start(_type, _args) do
children = [
MyAppWeb.Endpoint,
MyApp.Repo,
TigerOps.Supervisor, # <-- add this
]
Supervisor.start_link(children, strategy: :one_for_one)
end
# Custom GenServer span example
defmodule MyApp.InventoryServer do
use GenServer
def check_stock(item_id) do
TigerOps.Span.genserver(__MODULE__, :check_stock, fn ->
GenServer.call(__MODULE__, {:check_stock, item_id})
end)
end
def handle_call({:check_stock, item_id}, _from, state) do
# Automatically part of the parent trace context
result = MyApp.Repo.get(MyApp.Inventory, item_id)
{:reply, result, state}
end
endCommon Questions
Which Elixir and OTP versions are supported?
Elixir 1.14, 1.15, and 1.16 on OTP 25, 26, and 27 are fully supported. Phoenix 1.7+ is required for the LiveView telemetry integration. Ecto 3.10+ is required for query span support.
Does tigerops work with Erlang (non-Elixir) applications?
Yes. The BEAM VM metric collector is implemented as a plain Erlang gen_server and is available separately as the tigerops_erlang Hex package. It integrates with the same TigerOps backend and API key.
How does TigerOps handle the actor model and process isolation?
Each spawned process that participates in a trace carries the OpenTelemetry context in its process dictionary. TigerOps provides TigerOps.Context.propagate/1 helpers to manually transfer context when spawning processes outside of telemetry-instrumented paths.
Can I instrument LiveView events and socket assigns?
Yes. The Phoenix LiveView integration hooks into handle_event, handle_info, and mount telemetry events. Each LiveView lifecycle callback creates a span tagged with the socket ID and the component module.
How does TigerOps handle Mix releases and Distillery?
Set TIGEROPS_API_KEY in your release env config or in config/runtime.exs using System.get_env("TIGEROPS_API_KEY"). The TigerOps application supervisor starts automatically as part of the OTP application boot sequence.
Full Elixir Observability in One mix deps.get
BEAM VM metrics, Phoenix tracing, Ecto spans, and GenServer visibility — no code changes required.