Ratelane.

JavaScript SDK

Full configuration reference for the Ratelane JavaScript SDKs.

Packages

PackageFramework
@ratelane/expressExpress
@ratelane/fastifyFastify
@ratelane/honoHono

Config options

All three packages share the same config shape:

OptionTypeRequiredDescription
apiKeystringYour Ratelane API key from the dashboard
serviceNamestringIdentifies this service in the fleet
instanceVersionstringYour app version, shown in instance detail
pollIntervalnumberTelemetry poll interval in ms (default: 30000)
alertEmailstringEmail to notify on circuit breaker trips
frameworkstringOverride auto-detected framework name

Route discovery

Routes are collected automatically on startup:

  • Express — via attach(app) after all routes are registered
  • Fastify — via the plugin's onRoute hook
  • Hono — via middleware introspection

HEAD routes are filtered from discovery but still enforced normally.

Device info

Every telemetry poll includes:

{
  sdk_version: string,      // auto from package.json
  runtime: 'node',
  runtime_version: string,  // e.g. "20.11.0"
  framework: string,        // e.g. "express"
  instance_version: string  // from your config
}

On this page