Roda
Send traces to Last9 from a Roda app using OpenTelemetry
Roda is a routing tree web toolkit for Ruby. This guide will help you set up OpenTelemetry instrumentation for your Roda application. You can also check out the example application on GitHub↗.
Pre-requisites
Before you begin, make sure you have:
- A Roda application set up and running.
- Signed up for Last9 and created a cluster.
- Obtained the following OTLP credentials from the Integrations page:
endpoint
auth_header
These credentials will be necessary for sending traces to your Last9 cluster.
Install OpenTelemetry Packages
To instrument your Roda application with OpenTelemetry, you need to install several gems. Add the following lines to your Gemfile
:
Then, run the following command to install the packages:
Set Environment Variables
Create a .env
file in the root directory of your application and add the following environment variables:
Configure Roda Application
Add the following code to your Roda application to initialize OpenTelemetry in a new file instrumentation.rb
:
Update your entry file such as app.rb
to load the instrumentation:
Verify the setup
Start the Roda application and make some requests to it. You should see the application traces in your Last9 dashboard.
Troubleshooting
Please get in touch with us on Discord or Email if you have any questions.