runtime: increment trigger/service counters on the bus

This commit is contained in:
MasseR committed 2026-09-15 16:34:35 +03:00
1 parent 09479b5c48
commit 2a477b4977
4 files changed
+45 -8

No files matched your search

+4 -1
View File
@@ -96,7 +96,9 @@ receiveLoop bus conn = forever $ do
Left () -> atomically $ writeTChan (busInbound bus) Tick
Right msg -> case eitherDecode msg of
Left err -> putStrLn $ "[reader] skipping undecodable message: " <> err
Right v -> atomically $ writeTChan (busInbound bus) (Event v)
Right v -> do
recordInbound bus
atomically $ writeTChan (busInbound bus) (Event v)
receiveJSON :: WS.Connection -> IO Value
receiveJSON conn = do
@@ -128,6 +130,7 @@ sendWithId bus conn request svc = do
let textData = encode $ encodeService callId svc
runKatipContextT (busLogEnv bus) (sl "traceId" (toText (requestTraceId request))) "connection" $
logFM DebugS (ls textData)
recordOutbound bus
WS.sendTextData conn textData
writerAction :: Bus -> IO Void