Error Monitoring
How it works
DeployRamp tracks errors reported via the SDK and correlates them with active feature flags. When the error rate for a flag exceeds a configurable threshold, that flag is automatically rolled back, no redeploy, no on-call page. Users are seamlessly routed to the safe code path in real time.
Reporting errors
Use the report() function to send errors to DeployRamp. The call is fire-and-forget: it returns immediately and sends the error data in the background, so it will never slow down your application.
import { report } from "@deployramp/sdk";
try {
processPayment();
} catch (err) {
report(err, "new-checkout");
// Fallback handling...
}How errors tie to flags
The second argument to report() is the flagName. This ties the error to a specific flag so DeployRamp knows which rollout to pause or roll back when errors spike. Without this link, automatic rollback would not know which flag caused the regression.
Stack traces
Stack traces are captured automatically from Error objects. When you pass a native Error (or any subclass) to report(), the SDK extracts the stack trace and includes it in the payload. This makes it easy to diagnose issues from the DeployRamp dashboard without reproducing the error locally.
Error ingestion endpoint
Under the hood, error data is sent to POST /ingest/errors on the flags service. The SDK batches and sends this data asynchronously, keeping the overhead on your application negligible.