Skip to main content
Skip to main content

Ruby on Rails

This guide integrates:

✖️ Logs✖️ ️️Metrics✅ Traces

To send logs to ClickStack, please send logs via the OpenTelemetry collector.

Getting started

Install OpenTelemetry packages

Use the following command to install the OpenTelemetry package.

Configure OpenTelemetry + logger formatter

Next, you'll need to initialize the OpenTelemetry tracing instrumentation and configure the log message formatter for Rails logger so that logs can be tied back to traces automatically. Without the custom formatter, logs will not be automatically correlated together in ClickStack.

In config/initializers folder, create a file called hyperdx.rb and add the following to it:

Configure environment variables

Afterwards you'll need to configure the following environment variables in your shell to ship telemetry to ClickStack:

The OTEL_SERVICE_NAME environment variable is used to identify your service in the HyperDX app, it can be any name you want.

The OTEL_EXPORTER_OTLP_HEADERS environment variable contains the API Key available via HyperDX app in Team Settings → API Keys.