Skip to content

Commit 10558d0

Browse files
jutarodeepfire
authored andcommitted
new tracing: restructure the namespace
1 parent 0cd6878 commit 10558d0

File tree

22 files changed

+2685
-4497
lines changed

22 files changed

+2685
-4497
lines changed

cardano-node/src/Cardano/Node/Tracing/Documentation.hs

+83-66
Large diffs are not rendered by default.

cardano-node/src/Cardano/Node/Tracing/Tracers.hs

+58-58
Large diffs are not rendered by default.

cardano-node/src/Cardano/Node/Tracing/Tracers/BlockReplayProgress.hs

+3-4
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,15 @@ instance LogFormatting ReplayBlockStats where
4848
]
4949
forHuman ReplayBlockStats {..} = "Block replay progress " <> show rpsProgress <> "%"
5050
asMetrics ReplayBlockStats {..} =
51-
[DoubleM "Block replay progress (%)" rpsProgress]
51+
[DoubleM "ChainDB.BlockReplayProgress" rpsProgress]
5252

5353
docReplayedBlock :: Documented ReplayBlockStats
5454
docReplayedBlock = Documented [
5555
DocMsg
5656
["LedgerReplay"]
57-
[("Block replay progress (%)",
58-
"Progress in percent")]
57+
[("ChainDB.BlockReplayProgress", "Progress in percent")]
5958
"Counts up the percent of a block replay."
60-
]
59+
]
6160

6261
withReplayedBlock :: Trace IO ReplayBlockStats
6362
-> IO (Trace IO (ChainDB.TraceEvent blk))

cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs

+20-20
Original file line numberDiff line numberDiff line change
@@ -399,20 +399,20 @@ instance ( LogFormatting (Header blk)
399399
asMetrics (ChainDB.SwitchedToAFork _warnings newTipInfo _oldChain newChain) =
400400
let ChainInformation { slots, blocks, density, epoch, slotInEpoch } =
401401
chainInformation newTipInfo newChain 0
402-
in [ DoubleM "cardano.node.density" (fromRational density)
403-
, IntM "cardano.node.slotNum" (fromIntegral slots)
404-
, IntM "cardano.node.blockNum" (fromIntegral blocks)
405-
, IntM "cardano.node.slotInEpoch" (fromIntegral slotInEpoch)
406-
, IntM "cardano.node.epoch" (fromIntegral (unEpochNo epoch))
402+
in [ DoubleM "ChainDB.Density" (fromRational density)
403+
, IntM "ChainDB.SlotNum" (fromIntegral slots)
404+
, IntM "ChainDB.BlockNum" (fromIntegral blocks)
405+
, IntM "ChainDB.SlotInEpoch" (fromIntegral slotInEpoch)
406+
, IntM "ChainDB.Epoch" (fromIntegral (unEpochNo epoch))
407407
]
408408
asMetrics (ChainDB.AddedToCurrentChain _warnings newTipInfo _oldChain newChain) =
409409
let ChainInformation { slots, blocks, density, epoch, slotInEpoch } =
410410
chainInformation newTipInfo newChain 0
411-
in [ DoubleM "cardano.node.density" (fromRational density)
412-
, IntM "cardano.node.slotNum" (fromIntegral slots)
413-
, IntM "cardano.node.blockNum" (fromIntegral blocks)
414-
, IntM "cardano.node.slotInEpoch" (fromIntegral slotInEpoch)
415-
, IntM "cardano.node.epoch" (fromIntegral (unEpochNo epoch))
411+
in [ DoubleM "ChainDB.Density" (fromRational density)
412+
, IntM "ChainDB.SlotNum" (fromIntegral slots)
413+
, IntM "ChainDB.BlockNum" (fromIntegral blocks)
414+
, IntM "ChainDB.SlotInEpoch" (fromIntegral slotInEpoch)
415+
, IntM "ChainDB.Epoch" (fromIntegral (unEpochNo epoch))
416416
]
417417
asMetrics _ = []
418418

@@ -621,35 +621,35 @@ docChainDBAddBlock = Documented [
621621
\ it is preferable to our chain)."
622622
, DocMsg
623623
["AddedToCurrentChain"]
624-
[("cardano.node.density",
624+
[("ChainDB.Density",
625625
"The actual number of blocks created over the maximum expected number\
626626
\ of blocks that could be created over the span of the last @k@ blocks.")
627-
, ("cardano.node.slots",
627+
, ("ChainDB.Slots",
628628
"Number of slots in this chain fragment.")
629-
, ("cardano.node.blocks",
629+
, ("ChainDB.Blocks",
630630
"Number of blocks in this chain fragment.")
631-
, ("cardano.node.slotInEpoch",
631+
, ("ChainDB.SlotInEpoch",
632632
"Relative slot number of the tip of the current chain within the\
633633
\epoch..")
634-
, ("cardano.node.epoch",
634+
, ("ChainDB.Epoch",
635635
"In which epoch is the tip of the current chain.")
636636
]
637637
"The new block fits onto the current chain (first\
638638
\ fragment) and we have successfully used it to extend our (new) current\
639639
\ chain (second fragment)."
640640
, DocMsg
641641
["SwitchedToAFork"]
642-
[ ("cardano.node.density",
642+
[ ("ChainDB.Density",
643643
"The actual number of blocks created over the maximum expected number\
644644
\ of blocks that could be created over the span of the last @k@ blocks.")
645-
, ("cardano.node.slots",
645+
, ("ChainDB.Slots",
646646
"Number of slots in this chain fragment.")
647-
, ("cardano.node.blocks",
647+
, ("ChainDB.Blocks",
648648
"Number of blocks in this chain fragment.")
649-
, ("cardano.node.slotInEpoch",
649+
, ("ChainDB.SlotInEpoch",
650650
"Relative slot number of the tip of the current chain within the\
651651
\epoch..")
652-
, ("cardano.node.epoch",
652+
, ("ChainDB.Epoch",
653653
"In which epoch is the tip of the current chain.")
654654
]
655655
"The new block fits onto some fork and we have switched to that fork\

0 commit comments

Comments
 (0)