<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.
export const const serve: <Self>(
tag: ApiMetricsTag<Self>,
options?: ApiMetricsTagOptions
) => any
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
.
serve = <function (type parameter) Self in <Self>(tag: ApiMetricsTag<Self>, options?: ApiMetricsTagOptions): anySelf>(
tag: ApiMetricsTag<Self>tag: type ApiMetricsTag<Self> = anyAn
ApiMetrics
instance tag — a
HyperlinkTag
plus the linked client id.
ApiMetricsTag<function (type parameter) Self in <Self>(tag: ApiMetricsTag<Self>, options?: ApiMetricsTagOptions): anySelf>,
options: ApiMetricsTagOptionsoptions?: ApiMetricsTagOptions,
) => import resourceServeresourceServe(tag: ApiMetricsTag<Self>tag, const buildImpl: (
clientId: string,
options?: ApiMetricsTagOptions
) => Effect.Effect<
{
readonly metrics: Stream.Stream<ApiUsageMetrics>
readonly usage: Subscribable<ApiUsageSnapshot>
},
never,
Scope.Scope
>
buildImpl(tag: ApiMetricsTag<Self>tag[const clientIdSym: typeof clientIdSymWhere the linked outbound client id is stored on an
ApiMetrics
tag.
clientIdSym], options: ApiMetricsTagOptionsoptions));