Skip to content

Commit

Permalink
log: telemetry log current cut periodically, instead of on changes
Browse files Browse the repository at this point in the history
This makes telemetry more reliable in the case of stalls and also much
less expensive in terms of disk space.

Change-Id: I28b5efa9d89323b1e381c1bd9085e46fb9afb040
  • Loading branch information
edmundnoble authored and chessai committed Jun 27, 2024
1 parent bc88b4c commit f5a0cf1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changes/2024-06-19T182508-0400.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Log current cut periodically, instead of when it changes, for more
consistency and less space use.
6 changes: 3 additions & 3 deletions node/ChainwebNode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ runMonitorLoop actionLabel logger = runForeverThrottled
runCutMonitor :: Logger logger => logger -> CutDb tbl -> IO ()
runCutMonitor logger db = L.withLoggerLabel ("component", "cut-monitor") logger $ \l ->
runMonitorLoop "ChainwebNode.runCutMonitor" l $ do
S.mapM_ (logFunctionJson l Info)
$ S.map (cutToCutHashes Nothing)
$ cutStream db
logFunctionJson l Info . cutToCutHashes Nothing
=<< _cut db
threadDelay 15_000_000

data BlockUpdate = BlockUpdate
{ _blockUpdateBlockHeader :: !(ObjectEncoded BlockHeader)
Expand Down

0 comments on commit f5a0cf1

Please sign in to comment.