Hyperlinkv0.8.0-beta.28

ApiMetrics

ApiMetrics.serveconstsrc/ApiMetrics.ts:244
<Self>(
  tag: ApiMetricsTag<Self>,
  options?: ApiMetricsTagOptions
): Layer.Layer<
  Handler<"metrics"> | Handler<"usage"> | Self | Local<Self>,
  never,
  Scope.Scope
>

Serve this metrics resource and grant its local instance from one materialization — the counterpart to Hyperlink.serve, fed from the in-process usage registry (ApiMetrics.layer semantics, via instrumentEndpoints). Add the tag to the served node's Group and drop this into Node.httpServer; a served-only edge uses serveRemote.

layers & servingHyperlink.serveApiMetrics.layerNode.httpServerserveRemote
Source src/ApiMetrics.ts:2444 lines
export const serve = <Self>(
  tag: ApiMetricsTag<Self>,
  options?: ApiMetricsTagOptions,
) => resourceServe(tag, buildImpl(tag[clientIdSym], options));