Skip to content

Commit 5a0111d

Browse files
jutaromgmeier
authored andcommitted
cardano-node: forgedSlotLast and Forge.forged metrics
1 parent f6ce1f7 commit 5a0111d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,8 +1775,9 @@ instance ( tx ~ GenTx blk
17751775
[CounterM "Forge.node-is-leader" Nothing]
17761776
asMetrics TraceForgeTickedLedgerState {} = []
17771777
asMetrics TraceForgingMempoolSnapshot {} = []
1778-
asMetrics (TraceForgedBlock _slot _ _ _) =
1779-
[CounterM "Forge.forged" Nothing]
1778+
asMetrics (TraceForgedBlock slot _ _ _) =
1779+
[IntM "forgedSlotLast" (fromIntegral $ unSlotNo slot),
1780+
CounterM "Forge.forged" Nothing]
17801781
asMetrics (TraceDidntAdoptBlock _slot _) =
17811782
[CounterM "Forge.didnt-adopt" Nothing]
17821783
asMetrics (TraceForgedInvalidBlock _slot _ _) =
@@ -1875,7 +1876,8 @@ instance MetaTrace (TraceForgeEvent blk) where
18751876
metricsDocFor (Namespace _ ["ForgeTickedLedgerState"]) = []
18761877
metricsDocFor (Namespace _ ["ForgingMempoolSnapshot"]) = []
18771878
metricsDocFor (Namespace _ ["ForgedBlock"]) =
1878-
[("Forge.forged", "")]
1879+
[("forgedSlotLast", "Slot number of the last forged block"),
1880+
("Forge.forged", "Counter of forged blocks")]
18791881
metricsDocFor (Namespace _ ["DidntAdoptBlock"]) =
18801882
[("Forge.didnt-adopt", "")]
18811883
metricsDocFor (Namespace _ ["ForgedInvalidBlock"]) =
@@ -2256,9 +2258,8 @@ instance MetaTrace (Jumping.TraceEventCsj peer blk) where
22562258
\case
22572259
_ -> Namespace [] []
22582260

2259-
severityFor ns _ =
2260-
case ns of
2261-
_ -> Nothing
2261+
severityFor _ns _ =
2262+
Nothing
22622263

22632264
documentFor = \case
22642265
Namespace _ _ ->

0 commit comments

Comments
 (0)