Skip to content

GetMetricMetadata

Source: src/AWS/AMP/GetMetricMetadata.ts

Runtime binding for aps:GetMetricMetadata — read metric metadata (type, help, unit) from an AMP Workspace’s Prometheus-compatible api/v1/metadata endpoint, SigV4-signed with the host Function’s credentials.

const getMetricMetadata = yield* AMP.GetMetricMetadata(workspace);
const metadata = yield* getMetricMetadata({});
// { http_requests_total: [{ type: "counter", help: "...", unit: "" }], ... }