ZeroCopyZeroCopy
ReferenceManagement API

Retrieve Prometheus metrics

GET
/metrics

Requires the usage:read scope. Returns one complete UTC minute of transaction and receiver gauges in Prometheus text format. Data is 3 minutes behind.

Authorization

managementKey
headerAuthorizationBearer <zc_mgmt_>

Response Body

Minute gauges with explicit millisecond timestamps. Cache hits do not count toward the team's concurrent query limit.

response?MetricsTexttext/plain; version=0.0.4; charset=utf-8

Prometheus text exposition 0.0.4; every metric is a gauge with an explicit minute-end millisecond timestamp

Example request
// src/bin/management_metrics.rs
use swqos_examples::swqos::{Result, required};

#[tokio::main]
async fn main() -> Result<()> {
    let response = reqwest::Client::new()
        .get("https://console.zerocopy.sh/api/v1/metrics")
        .bearer_auth(required("MANAGEMENT_API_KEY")?)
        .send()
        .await?;
    let status = response.status();
    let body = response.text().await?;
    if !status.is_success() {
        return Err(format!("HTTP {status}: {body}").into());
    }
    print!("{body}");
    Ok(())
}
Example response
# HELP zerocopy_key_info Key name, customer and state; value 1.# TYPE zerocopy_key_info gaugezerocopy_key_info{key_id="key_012345abcdef",name="Primary sender",customer="example-client",state="active"} 1 1794536040000zerocopy_key_info{key_id="key_89abcdef0123",name="Research sender",customer="example-research",state="active"} 1 1794536040000# HELP zerocopy_swqos_transactions Transactions by outcome in the minute. Data is 3 minutes behind.# TYPE zerocopy_swqos_transactions gaugezerocopy_swqos_transactions{key_id="key_012345abcdef",metro="fra",outcome="landed"} 3 1794536040000zerocopy_swqos_transactions{key_id="key_89abcdef0123",metro="fra",outcome="expired"} 1 1794536040000zerocopy_swqos_transactions{key_id="key_89abcdef0123",metro="lon",outcome="failed"} 1 1794536040000# HELP zerocopy_swqos_slots_to_land Slots from send to successful landing, landed transactions only. Data is 3 minutes behind.# TYPE zerocopy_swqos_slots_to_land gaugezerocopy_swqos_slots_to_land{key_id="key_012345abcdef",metro="fra",quantile="0.5"} 2 1794536040000zerocopy_swqos_slots_to_land{key_id="key_012345abcdef",metro="fra",quantile="0.9"} 2 1794536040000zerocopy_swqos_slots_to_land{key_id="key_012345abcdef",metro="fra",quantile="0.99"} 2 1794536040000