Skip to content
Hayonix

API reference · Schema

ServerlessEndpointRequestMetrics

  • objectstringrequired

    Always `serverless_endpoint_request_metrics`: the type of this object

    One ofserverless_endpoint_request_metrics

  • endpoint_idstringrequired

    ID of the endpoint

  • window_secondsintegerrequired

    Length of the window covered, in seconds, ending now

  • bucket_secondsintegerrequired

    Width of each bucket, in seconds

  • bucketsarray of objectrequired

    Buckets with any requests, oldest first

    Show 9 fields of buckets
    • startstring (date-time)required

      Start of the bucket

    • requestsintegerrequired

      Requests in the period

    • requests_per_secondnumberrequired

      Average requests per second over the period

    • statusobjectrequired

      Answers by status class: 2xx, 3xx, 4xx and 5xx

      Show 4 fields of status
      • successintegerrequired

        Answers with a 2xx status

      • redirectintegerrequired

        Answers with a 3xx status

      • client_errorintegerrequired

        Answers with a 4xx status

      • server_errorintegerrequired

        Answers with a 5xx status

    • latency_msobjectrequired

      Time to response headers. Percentiles are the upper bound of a fixed histogram bucket (5, 10, 25, 50, 100, 250, 500 ms, 1, 2.5, 5, 10, 30, 60, 300 s), capped by the maximum

      Show 5 fields of latency_ms
      • avgnumber | nullrequired

        Mean latency in milliseconds; null without requests

      • p50number | nullrequired

        Median (p50) latency in milliseconds; null without requests

      • p95number | nullrequired

        95th percentile (p95) latency in milliseconds; null without requests

      • p99number | nullrequired

        99th percentile (p99) latency in milliseconds; null without requests

      • maxnumber | nullrequired

        Highest latency in milliseconds; null without requests

    • in_flightobjectrequired

      Concurrent requests being served

      Show 2 fields of in_flight
      • avgnumberrequired

        Average number of requests in flight at once over the period

      • maxintegerrequired

        Most requests in flight at once

    • unroutedintegerrequired

      Answered by the platform without reaching a worker (no worker ready in time, payment required, limits)

    • cold_waitsintegerrequired

      Requests that found no ready worker and waited for one to start or resume

    • cold_wait_msobjectrequired

      How long the requests counted in `cold_waits` waited for a worker

      Show 2 fields of cold_wait_ms
      • avgnumber | nullrequired

        Mean wait for a ready worker, in milliseconds; null when there was none

      • maxnumber | nullrequired

        Longest wait for a ready worker, in milliseconds; null when there was none

  • workersarray of objectrequired

    The whole window per worker

    Show 6 fields of workers
    • worker_idstringrequired

      ID of the worker

    • requestsintegerrequired

      Requests in the period

    • requests_per_secondnumberrequired

      Average requests per second over the period

    • statusobjectrequired

      Answers by status class: 2xx, 3xx, 4xx and 5xx

      Show 4 fields of status
      • successintegerrequired

        Answers with a 2xx status

      • redirectintegerrequired

        Answers with a 3xx status

      • client_errorintegerrequired

        Answers with a 4xx status

      • server_errorintegerrequired

        Answers with a 5xx status

    • latency_msobjectrequired

      Time to response headers. Percentiles are the upper bound of a fixed histogram bucket (5, 10, 25, 50, 100, 250, 500 ms, 1, 2.5, 5, 10, 30, 60, 300 s), capped by the maximum

      Show 5 fields of latency_ms
      • avgnumber | nullrequired

        Mean latency in milliseconds; null without requests

      • p50number | nullrequired

        Median (p50) latency in milliseconds; null without requests

      • p95number | nullrequired

        95th percentile (p95) latency in milliseconds; null without requests

      • p99number | nullrequired

        99th percentile (p99) latency in milliseconds; null without requests

      • maxnumber | nullrequired

        Highest latency in milliseconds; null without requests

    • in_flightobjectrequired

      Concurrent requests being served

      Show 2 fields of in_flight
      • avgnumberrequired

        Average number of requests in flight at once over the period

      • maxintegerrequired

        Most requests in flight at once

Example
{
  "object": "serverless_endpoint_request_metrics",
  "endpoint_id": "string",
  "window_seconds": 1,
  "bucket_seconds": 1,
  "buckets": [
    {
      "start": "2026-01-01T00:00:00.000Z",
      "requests": 1,
      "requests_per_second": 1.5,
      "status": {
        "success": 1,
        "redirect": 1,
        "client_error": 1,
        "server_error": 1
      },
      "latency_ms": {
        "avg": 1.5,
        "p50": 1.5,
        "p95": 1.5,
        "p99": 1.5,
        "max": 1.5
      },
      "in_flight": {
        "avg": 1.5,
        "max": 1
      },
      "unrouted": 1,
      "cold_waits": 1,
      "cold_wait_ms": {
        "avg": 1.5,
        "max": 1.5
      }
    }
  ],
  "workers": [
    {
      "worker_id": "string",
      "requests": 1,
      "requests_per_second": 1.5,
      "status": {
        "success": 1,
        "redirect": 1,
        "client_error": 1,
        "server_error": 1
      },
      "latency_ms": {
        "avg": 1.5,
        "p50": 1.5,
        "p95": 1.5,
        "p99": 1.5,
        "max": 1.5
      },
      "in_flight": {
        "avg": 1.5,
        "max": 1
      }
    }
  ]
}

Used by