Skip to content

Commit

Permalink
cardano-node: fetch metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
jutaro committed Oct 24, 2024
1 parent a5b99cc commit 387a454
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1719,11 +1719,13 @@ instance ( tx ~ GenTx blk
[IntM "Forge.could-not-forge" (fromIntegral $ unSlotNo slot)]
asMetrics (TraceNoLedgerView slot _) =
[IntM "Forge.could-not-forge" (fromIntegral $ unSlotNo slot)]
asMetrics (TraceLedgerView slot) = []
asMetrics (TraceLedgerView _) = []
asMetrics (TraceBlockContext _ _ _) = []
asMetrics (TraceLedgerState _ _) = []
asMetrics (TraceNodeCannotForge slot _reason) =
[IntM "Forge.could-not-forge" (fromIntegral $ unSlotNo slot)]
asMetrics (TraceNodeNotLeader slot) =
[IntM "Forge.nodeNotLeader" (fromIntegral $ unSlotNo slot)]
[IntM "Forge.node-not-leader" (fromIntegral $ unSlotNo slot)]
asMetrics (TraceNodeIsLeader slot) =
[IntM "Forge.node-is-leader" (fromIntegral $ unSlotNo slot)]
asMetrics TraceForgeTickedLedgerState {} = []
Expand Down Expand Up @@ -1801,45 +1803,42 @@ instance MetaTrace (TraceForgeEvent blk) where
severityFor _ _ = Nothing

metricsDocFor (Namespace _ ["StartLeadershipCheck"]) =
[("aboutToLeadSlotLast", "")]
[("Forge.about-to-lead", "")]
metricsDocFor (Namespace _ ["SlotIsImmutable"]) =
[("slotIsImmutable", "")]
[("Forge.slot-is-immutable", "")]
metricsDocFor (Namespace _ ["BlockFromFuture"]) =
[("blockFromFuture", "")]
metricsDocFor (Namespace _ ["BlockContext"]) =
[("blockContext", "")]
[("Forge.block-from-future", "")]
metricsDocFor (Namespace _ ["BlockContext"]) = []
metricsDocFor (Namespace _ ["NoLedgerState"]) =
[("couldNotForgeSlotLast", "")]
metricsDocFor (Namespace _ ["LedgerState"]) =
[("ledgerState", "")]
[("Forge.could-not-forge", "")]
metricsDocFor (Namespace _ ["LedgerState"]) = []
metricsDocFor (Namespace _ ["NoLedgerView"]) =
[("couldNotForgeSlotLast", "")]
metricsDocFor (Namespace _ ["LedgerView"]) =
[("ledgerView", "")]
[("Forge.could-not-forge", "")]
metricsDocFor (Namespace _ ["LedgerView"]) = []
metricsDocFor (Namespace _ ["ForgeStateUpdateError"]) =
[ ("operationalCertificateStartKESPeriod", "")
, ("operationalCertificateExpiryKESPeriod", "")
, ("currentKESPeriod", "")
, ("remainingKESPeriods", "")
]
metricsDocFor (Namespace _ ["NodeCannotForge"]) =
[("nodeCannotForge", "")]
[("Forge.could-not-forge", "")]
metricsDocFor (Namespace _ ["NodeNotLeader"]) =
[("nodeNotLeader", "")]
[("Forge.node-not-leader", "")]
metricsDocFor (Namespace _ ["NodeIsLeader"]) =
[("nodeIsLeader", "")]
[("Forge.node-is-leader", "")]
metricsDocFor (Namespace _ ["ForgeTickedLedgerState"]) = []
metricsDocFor (Namespace _ ["ForgingMempoolSnapshot"]) = []
metricsDocFor (Namespace _ ["ForgedBlock"]) =
[("forgedSlotLast", "")]
[("Forge.forged", "")]
metricsDocFor (Namespace _ ["DidntAdoptBlock"]) =
[("notAdoptedSlotLast", "")]
[("Forge.didnt-adopt", "")]
metricsDocFor (Namespace _ ["ForgedInvalidBlock"]) =
[("forgedInvalidSlotLast", "")]
[("Forge.forged-invalid", "")]
metricsDocFor (Namespace _ ["AdoptedBlock"]) =
[("adoptedOwnBlockSlotLast", "")]
[("Forge.adopted", "")]
metricsDocFor (Namespace _ ["AdoptionThreadDied"]) =
[("adoptionThreadDied", "")]
[("Forge.adoption-thread-died", "")]
metricsDocFor _ = []

documentFor (Namespace _ ["StartLeadershipCheck"]) = Just
Expand Down

0 comments on commit 387a454

Please sign in to comment.