tj-scale 1.0.0
TjScaleRuby reports metrics from your Rails app to an TJ Scale (or compatible) control plane so it can autoscale Heroku formation from rules you configure there. Behavior at a glance: - Runs a background loop on exactly one dyno: web.1 or worker.1 (configurable). - Worker reporter: waiting job count and oldest-job age (queue_time_s) from Delayed Job or Sidekiq — pick with TJ_SCALE_JOB_BACKEND (auto-detected by default). - Web reporter: router queue_time_ms (Rack middleware + X-Request-Start), request volume, and average response time per reporting interval. - Sends target Heroku app and process type on every POST; scaling limits (min/max dynos) are configured in the control plane's dashboard settings. - Configure with environment variables; no Rails initializer required. Requires Rails 6.1+ and Ruby 3.0+. Bring your own queue gem: delayed_job_active_record or sidekiq (worker reporters only).