Step 1: Install dependencies
Install dependencies related to OpenTelemetry SDK and exporter using gem.
gem install opentelemetry-sdk
gem install opentelemetry-exporter-otlp
gem install opentelemetry-instrumentation-all
Include the required packages into your gemfile.
Run the bundle install command:
Step 2: Initialize the OpenTelemetry SDK
Initialize the otel sdk by adding below lines to
config/environment.rb of your Ruby on Rails application.
OpenTelemetry::SDK.configure do |c|
Step 3: Running your Ruby application
Now we have to set the following environment variables to export the collected telemetry data for storage and visualization.
OTEL_EXPORTER: It is the format of exported data. Since SigNoz natively supports otlp so it should be set as
OTEL_SERVICE_NAME: Name of service(anything you want)
OTEL_EXPORTER_OTLP_ENDPOINT: Specify the endpoint of OTEL collector in format
http://IP_OF_SIGNOZ:4318. The OTEL collector comes bundled with SigNoz installation. Since, we installed SigNoz on our local machine, the endpoint is
OTEL_RESOURCE_ATTRIBUTES: Pass custom attributes like application name with
Using the above mentioned environment variables, run the application:
OTEL_EXPORTER=otlp OTEL_SERVICE_NAME=yourSampleRailsApp OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 OTEL_RESOURCE_ATTRIBUTES=application=sparkapp rails server
Here's a tutorial with step by step guide on how to install SigNoz and start monitoring a sample Ruby on Rails app.
Here's a detailed guide published by our community member Vederis on how to monitor your Ruby on Rails application with OpenTelemetry and SigNoz.
Frequently Asked Questions
How to find what to use in
IP of SigNozif I have installed SigNoz in Kubernetes cluster?
Based on where you have installed your application and where you have installed SigNoz, you need to find the right value for this. Please use this grid to find the value you should use for
IP of SigNoz
I am sending data from my application to SigNoz, but I don't see any events or graphs in the SigNoz dashboard. What should I do?
This could be because of one of the following reasons:
Your application is generating telemetry data, but not able to connect with SigNoz installation
Please use this troubleshooting guide to find if your application is able to access SigNoz installation and send data to it.
Your application is not actually generating telemetry data
Please check if the application is generating telemetry data first. You can use
Console Exporterto just print your telemetry data in console first. Join our Slack Community if you need help on how to export your telemetry data in console
Your SigNoz installation is not running or behind a firewall
Please double check if the pods in SigNoz installation are running fine.
kubectl get pods -n platformare your friends for this.