<Self>(tag: TelemetryTag<Self>, options?: TelemetryOptions): Layer.Layer<
| Self
| Hyperlink.Local<Self>
| Handler<"snapshot">
| Handler<"live">
| Handler<"inFlightByNode">
| Handler<"fleetInFlight">,
never,
Scope.Scope | Hyperlink.PeersId<Self> | Hyperlink.SelfNodeId<Self>
>Serve this Telemetry resource and grant its local instance from one materialization —
counterpart to Hyperlink.serve. Forks one sampling fiber, mounts leaf + fleet handlers,
and grants Self | Local<Self>. Requires the mesh capability (alone or
Hyperlink.peersLayer):
Telemetry.serve(FleetMetrics).pipe(
Layer.provide(Hyperlink.peersLayer(FleetMetrics, DropletEast)),
)Source src/Telemetry.ts:4824 lines
export const const serve: <Self>(
tag: TelemetryTag<Self>,
options?: TelemetryOptions
) => any
Serve this Telemetry resource and grant its local instance from one materialization —
counterpart to
Hyperlink.serve
. Forks one sampling fiber, mounts leaf + fleet handlers,
and grants Self | Local<Self>. Requires the mesh capability (
alone
or
Telemetry.serve(FleetMetrics).pipe(
Layer.provide(Hyperlink.peersLayer(FleetMetrics, DropletEast)),
)
serve = <function (type parameter) Self in <Self>(tag: TelemetryTag<Self>, options?: TelemetryOptions): anySelf>(
tag: TelemetryTag<Self>tag: type TelemetryTag<Self> = HyperlinkTag<
Self,
{
snapshot: any
live: any
inFlightByNode: any
fleetInFlight: any
}
>
A Telemetry instance tag.
TelemetryTag<function (type parameter) Self in <Self>(tag: TelemetryTag<Self>, options?: TelemetryOptions): anySelf>,
options: TelemetryOptionsoptions?: TelemetryOptions,
) => import resourceServeresourceServe(tag: TelemetryTag<Self>tag, const buildImpl: <Self>(
tag: TelemetryTag<Self>,
options?: TelemetryOptions
) => Effect.Effect<
{
readonly snapshot: Effect.Effect<MetricsSnapshot>
readonly live: Stream.Stream<MetricsSnapshot>
readonly inFlightByNode: Effect.Effect<
Readonly<Record<string, number>>
>
readonly fleetInFlight: Effect.Effect<number>
},
never,
Scope.Scope | PeersId<Self> | SelfNodeId<Self>
>
The served impl: leaf snapshot/live plus fleet folds over peers' leaf snapshots.
Resolves
Hyperlink.peers
/
Hyperlink.selfNode
once; members close over them.
buildImpl(tag: TelemetryTag<Self>tag, options: TelemetryOptionsoptions));