GET
/
metrics
/
{basin}
curl --request GET \
  --url https://aws.s2.dev/v1/metrics/{basin} \
  --header 'Authorization: Bearer <token>'
{
  "values": [
    {
      "scalar": {
        "name": "<string>",
        "unit": "bytes",
        "value": 123
      }
    }
  ]
}

Metric sets

basin-ops

Set of accumulation metrics, one per basin operation. Each basin-level request is a single operation, and this endpoint will return as many timeseries as there are distinct basin operations with non-zero values within the specified period.

Requires a start and end timestamp. Accepts an optional interval parameter for minute / hour / day aggregations.

basin-storage

gauge of cumulative stored bytes, per hour, aggregated across all streams within the basin.

Requires a start and end timestamp.

append-ops

Returns accumulation of append operations aggregated across all streams within the basin, grouped by storage class.

An append operation is defined as one minute of appends to a single stream, using a single TCP connection.

For instance, 10 unary appends to stream X, each initializing a new connection, would be 10 append operations. 10 unary or streaming session appends to stream X, on a single TCP connection, within a single minute, would be 1 append operation.

Requires a start and end timestamp. Accepts an optional interval parameter for minute / hour / day aggregations.

append-bytes

Returns two accumulation metrics of appended throughput in bytes, aggregated across all streams within the basin: one for appends against express storage class streams, and another for appends against standard storage class streams.

Requires a start and end timestamp. Accepts an optional interval parameter for minute / hour / day aggregations.

read-ops

Returns two accumulation metrics of read operations, aggregated across all streams within the basin: one for reads from cold storage, and another for reads against hot storage. Reads from cold storage are guaranteed to be of records older than 20 seconds, and therefore will be priced at that rate, whereas hot reads are priced at the tailing rate.

A read operation is defined as one minute of reads from a single stream, using a single TCP connection.

For instance, 10 unary reads from stream X, each initializing a new connection, would be 10 read operations. 10 unary or streaming session reads from stream X, on a single TCP connection, within a single minute, would be 1 read operation.

Requires a start and end timestamp. Accepts an optional interval parameter for minute / hour / day aggregations.

read-bytes

accumulation of read throughput in bytes, aggregated across all streams within the basin.

Requires a start and end timestamp. Accepts an optional interval parameter for minute / hour / day aggregations.

This metric set does not currently separate egress traffic by client origin, which will be a dimension for billing.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

basin
string
required

Basin name.

Query Parameters

set
enum<string>
required

Metric set to return.

Available options:
storage,
append-ops,
read-ops,
read-throughput,
append-throughput,
basin-ops
start
integer

Start timestamp as Unix epoch seconds, if applicable for the metric set.

Required range: x >= 0
end
integer

End timestamp as Unix epoch seconds, if applicable for the metric set.

Required range: x >= 0
interval
enum<string>

Interval to aggregate over for timeseries metric sets.

Available options:
minute,
hour,
day

Response

200
application/json

The response is of type object.