@theaiinc/argus-sdk
v0.1.1
Published
Client SDK for reporting service health to Argus.
Readme
@theaiinc/argus-sdk
Client SDK for reporting service health to Argus.
Install
npm install @theaiinc/argus-sdkUsage
import { ArgusClient } from "@theaiinc/argus-sdk";
const client = new ArgusClient({
endpoint: "https://argus.theaiinc.com",
token: process.env.ARGUS_TOKEN
});
await client.report({
service: { name: "orders", version: "2.4.0", environment: "production" },
checks: [
{ id: "database", name: "Primary database", type: "dependency", status: "HEALTHY", latencyMs: 12 }
],
dependencies: [
{ target: "postgres", type: "database", criticality: "required" }
],
reportedAt: new Date().toISOString()
});report() is best-effort: it retries on failure and never throws, so it's
safe to call from a host service's own health-check path without risking an
unrelated outage if Argus itself is unreachable.
