Menu

StackMachine
    Observe usage

    Every visit counted.
    Every millisecond measured.

    Query traffic and compute for one app, a whole workspace, or everything you run: requests, unique users, status codes, CPU time, memory, and network use, in buckets from five minutes to a week.

    All your usage, from visits to CPU time. In real time.

    A dashboard for one app. Its requests, unique users, and CPU time add up through the day, and each new request shows in the totals, the chart, and the log.

    An illustration, with example data.

    Powering products and agents at

    Wasmer logo
    Simply Static logo
    Tiiny logo
    Manus logo
    ModularDS logo
    Traffic, in detail
    Total and cached requests, status codes by group, unique users, request duration, and the bytes served.
    Compute, measured
    CPU time, memory, and network ingress and egress for the workloads behind those requests.
    Any scope, any window
    Ask about one app, a user or workspace, or everything you can see. Group the results by five minutes, fifteen, an hour, a day, or a week.

    Ask for a time range.
    Get the numbers back.

    Pass an app, a start, and an end. Read the totals for the whole window, and the grouped results for the trend.

    Shell
    $ npm install stackmachine

    Read the docs

    observe.js
    import StackMachine from "stackmachine";
    
    const client = new StackMachine(process.env.STACKMACHINE_API_KEY);
    
    const usage = await client.usage.metrics({
      app: "da_XYZ",
      start: "2026-10-01T00:00:00Z",
      end: "2026-10-08T00:00:00Z",
      groupedBy: "BY_DAY",
    });
    
    const { requests, workloads } = usage.totals;
    console.log(requests.totalRequests, requests.uniqueUsers);
    console.log(workloads.realCpuTimeMillis, workloads.networkEgressBytes);
    
    for (const day of usage.grouped) {
      console.log(day.groupedAt, day.requests.totalRequests);
    }

    From a spike in traffic
    to the line that caused it.

    Metrics show what changed. Logs show why.

    Logs for every version

    Logs are kept per app version. Fetch them by time range, filter by stream (STDOUT, STDERR, or RUNTIME), search the text, or narrow them to one instance.

    Read the logs docs

    storefront, v14last 30 minutes
    • STDOUTGET /checkout 200 in 3 ms
    • STDOUTPOST /cart 201 in 4 ms
    • STDERRpayment retry for order 1042
    • RUNTIMEinstance started

    Usage across a workspace

    Pass owner instead of app to add up everything a user or workspace runs. Leave both out to cover every resource you can see.

    owner: "acme"3 apps
    apprequestsCPU time
    storefront12,48038.2 s
    admin1,9269.4 s
    webhooks8042.1 s
    Total15,210 requests, 49.7 s

    A few things
    to know.

    More in the documentation.

    Requests (total, cached, and by status code group), unique users, request duration, and bytes served, along with CPU time, memory, and network ingress and egress for the workloads.

    Start with your first query.

    One API key for hosting, storage, databases, email, and cron.