wai/wai-metrics, a crate with no dependencies, writes the text exposition format: counters and gauges with checked names and escaped label values, counts by labels fixed in the code, a request counter by route, method and status, and a strict reader of the format for tests. Every label is a &'static str, so no room, principal, account or address can become one. The room service, the ingest gateway (a resource of its table), wai-audit, wai-ledger, wai-fleet and wai-key-proxy answer GET /metrics with their requests, sessions and fan-out where they have them, what they hold, and the gateway's unmetered energy marker. The room service answers it before the routes of its API, outside openapi.json and the catalogue. Each service's test reads its answer strictly, moves its series with real requests, and finds none of the parties of those requests in it. wai-audit gains a library target: collector, http (App::new) and load_or_create; main.rs reads the environment and calls them, and the existing tests run through the library. Co-Authored-By: Claude Opus 5.5 <[email protected]>
14 lines
687 B
TOML
14 lines
687 B
TOML
# The text exposition format of a WAI service's `GET /metrics`, with no dependencies: the
|
|
# services beside wai-rs and the room service and ingest gateway of joule-code depend on it by
|
|
# path.
|
|
[package]
|
|
name = "wai-metrics"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
license = "Apache-2.0"
|
|
description = "The text exposition format of a WAI service's GET /metrics: counters and gauges written with their names checked and their label values escaped, every label fixed in the code, a request counter by route, method and status, and a strict reader of the format for tests."
|
|
repository = "https://git.transaction.science/Transaction-Science/open-standards"
|
|
publish = false
|
|
|
|
[dependencies]
|
|
# none
|