Skip to content

Ruby

The pyroscope gem is Grafana’s official Ruby SDK for continuous profiling. It samples on-CPU time and pushes profiles straight to KloudMate’s ingest endpoint.

  • The ingest endpoint: https://otel.kloudmate.com/v1/profiles/pyroscope
  • An API key — go to Settings → API Keys, click Add New, and create an Ingest Key – Backend. Copy it immediately; KloudMate shows it only once.
gem install pyroscope

Or add it to your Gemfile:

gem 'pyroscope'

Call Pyroscope.configure once, as early as possible in your boot sequence:

require 'pyroscope'

Pyroscope.configure do |config|
  config.application_name = 'my-service'
  config.server_address = 'https://otel.kloudmate.com/v1/profiles/pyroscope'
  config.basic_auth_username = 'KloudMate'
  config.basic_auth_password = 'YOUR_API_KEY'
end

Swap my-service for a name that identifies this deployment, and YOUR_API_KEY for the key you copied above.

Open Profiling → All Services, select cpu from the profile type dropdown, and give it a minute. Your service’s card appears with a live chart as soon as the first samples land.

If nothing shows up, check that basic_auth_username is set to the literal string KloudMate — a missing username is the most common cause of a silent 401.