Open source · Performance & Reliability

Error Budget Calculator

Calculate error budget from service objectives and observed events.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Calculate an event-count or elapsed-time error budget from two local JSON exports. The objective, observation window, and exclusions are explicit; nothing is queried from a monitoring service. The tool reports what the exported evidence supports, including when a conclusion is not possible.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+; inspect the source before using it on your own files.

Run the checked-in example

node bin/error-budget-calculator.mjs --root examples --definition events-definition.json --observations events-clean.json --json
node bin/error-budget-calculator.mjs --root examples --definition events-definition.json --observations events-failing.json --json
node bin/error-budget-calculator.mjs --root examples --definition duration-definition.json --observations duration-clean.json --json

Read the result

The first and third commands exit 0 (pass). The second exits 1 (fail) because two bad events exceed the exact allowance of one. Each prints a JSON report to stdout. Add --report report.json to also save identical bytes beneath the declared root. An existing regular report file may be replaced, but no input or alias of an input may be overwritten.

Where this check stops

This local walkthrough does not establish the state of a live production system or replace the limits documented in the repository.

Before adapting the command to your own workflow, review the accepted inputs, exit codes and safety boundaries in the README.

Compiled with AI assistance from checked-in public documentation and example scripts. Run the example and review the repository's current documentation before relying on its result.