Core RC.1 widens response header values to string | string[] (core
#113, a documented Breaking change for readers). The metrics test read
the transformer's content-type as a string and fails to typecheck
against the RC.1 candidate. Narrowing with String() also typechecks on
26.9.0-beta.2. Plugin source is unaffected.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The transformer is exported instead of a route: the path, the auth and whether
the endpoint exists are the application's decisions, and a plugin that mounted
/metrics itself would be taking them.
No onShutdown — a bus subscription is an entry in a set and keeps nothing alive,
which is what rule 7 asks about. Closes green-tea#68.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
A failed request emits three lifecycle events. request:end is the terminal and
universal one, so it is the request counter; request:failed is additional and
gets its own series. Counting both as requests is the double count issue #64
was filed for.
Labels come from route, which the route table bounds, never from name, which
carries the arriving path and is bounded by nothing — issue #65.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>