Elixir
This Guide Integrates:
✅ Logs | ✖️ Metrics | ✖️ Traces |
🚧 OpenTelemetry metrics & tracing instrumentation coming soon!
Getting Started
Install HyperDX Logger Backend Package
The package can be installed by adding hyperdx
to your list of dependencies in
mix.exs
:
def deps do
[
{:hyperdx, "~> 0.1.6"}
]
end
Configure Logger
Add the following to your config.exs
file:
# config/releases.exs
config :logger,
level: :info,
backends: [:console, {Hyperdx.Backend, :hyperdx}]
Configure Environment Variables
Afterwards you'll need to configure the following environment variables in your shell to ship telemetry to HyperDX:
export HYPERDX_API_KEY='<YOUR_HYPERDX_API_KEY_HERE>' \
OTEL_SERVICE_NAME='<NAME_OF_YOUR_APP_OR_SERVICE>'
The OTEL_SERVICE_NAME
environment variable is used to identify your service
in the HyperDX app, it can be any name you want.
That's it. You should now be able to see your app logs by heading over to HyperDX (opens in a new tab)!