rbBuilt for Ruby

Analytics & Monitoring
for Ruby

Same gem as the Rails integration, different setup. Drop the middleware into Sinatra, Hanami, Roda, or any Rack app and HTTP requests, ActiveRecord queries, and Sidekiq jobs are traced automatically.

  • Rack middleware works with Sinatra, Hanami, Roda, Grape
  • ActiveRecord query tracing (if you use it outside of Rails)
  • Sidekiq and Resque job tracing with retries captured
  • Threadsafe — works under Puma's clustered workers
  • Net::HTTP and Faraday outgoing-call tracing
  • Ships as a single gem with no native extensions
ruby
1# In config.ru or your app entrypoint
2require "justanalytics"
3
4JustAnalytics.init do |c|
5 c.api_key = ENV["JUSTANALYTICS_API_KEY"]
6 c.service_name = "my-ruby-api"
7 c.environment = "production"
8end
9
10# Sinatra / Hanami / Roda / raw Rack —
11# mount the middleware and you are done.
Active Users
0+12%
Pageviews
0+8%
Errors
0resolved
Uptime
0%all green

Built for Ruby services

Sinatra to Sidekiq, one gem covers the whole stack.

ActiveRecord tracing

Every AR query becomes a span — slow queries and N+1 problems surface in the same trace as the request that triggered them.

Rack middleware

Mounts under Sinatra::Base.use, Hanami's middleware stack, or any Rack-compatible config.ru. Works with Puma, Falcon, Unicorn.

Exception capture

Unhandled exceptions and rescued errors via JustAnalytics.capture_exception. Sidekiq job failures auto-captured.

Threadsafe

Per-thread trace context. Works under Puma's clustered + threaded workers without GIL surprises.

Full analytics suite

Add the frontend script for cookie-free analytics, replay, and Web Vitals. One dashboard for client + server.

Alert rules

Per-route latency, error-rate, and Sidekiq queue-depth alerts. Email, webhook, or PagerDuty.

Sinatra setup

Bundle add, init, use the middleware. Every Sinatra route is traced; Sidekiq jobs join the same trace.

# Install
bundle add justanalytics

# config.ru
require "sinatra/base"
require "justanalytics"

JustAnalytics.init do |c|
  c.api_key      = ENV["JUSTANALYTICS_API_KEY"]
  c.service_name = "my-sinatra-app"
  c.environment  = "production"
end

class MyApp < Sinatra::Base
  use JustAnalytics::Rack::Middleware

  get "/users/:id" do
    # ActiveRecord queries auto-traced
    User.find(params[:id]).to_json
  end
end

run MyApp

Ready to simplify your stack?

Replace five tools with one platform. Start with the free tier or try Pro free for 7 days.

Start 7-Day Free Trial