Ops.Plugin
Observability
Mountable Ops live dashboard: Telemetry fan-out, /_ops/socket, SPA shell.
Wire under Server.application:
init _ =
let
_ =
Ops.Plugin.install ()
in
( (), Cmd.none )
supervisor =
Supervisor.new OneForOne
|> Supervisor.add (Socket.supervised [ Ops.Plugin.socketMount ])
handle req =
case Ops.match req of
Ops.Metrics ->
Server.string 200 [] "text/plain; version=0.0.4" (Ops.metrics ())
Ops.Overview _ ->
Ops.Plugin.dashboardShell
Ops.None ->
...Point [client] entry at a module that re-exports Ops.App.main.
Values
install
install : () -> ()Attach a Telemetry handler that broadcasts EventArrived on Monitor.
socketMount
socketMount : Mount ()Dedicated Ops websocket mount at /_ops/socket.
dashboardShell
dashboardShell : ResponseSPA shell for /_ops. Client entry should expose main as Main.