Skip to content

Commit afaf32e

Browse files
committed
cardano-node: metrics comments
1 parent 2146f13 commit afaf32e

File tree

1 file changed

+14
-4
lines changed
  • cardano-node/src/Cardano/Node/Tracing/Tracers

1 file changed

+14
-4
lines changed

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ instance ( LogFormatting (Header blk)
507507
| not (null events) ]
508508
++ [ "tipBlockHash" .= tipBlockHash
509509
, "tipBlockParentHash" .= tipBlockParentHash
510-
, "tipBlockIssuerVerificationKeyHash" .= tipBlockIssuerVkHashText]
510+
, "tipBlockIssuerVKeyHash" .= tipBlockIssuerVkHashText]
511511
forMachine dtal (ChainDB.AddedToCurrentChain events selChangedInfo _base extended) =
512512
mconcat $
513513
[ "kind" .= String "AddedToCurrentChain"
@@ -542,7 +542,7 @@ instance ( LogFormatting (Header blk)
542542
| not (null events) ]
543543
++ [ "tipBlockHash" .= tipBlockHash
544544
, "tipBlockParentHash" .= tipBlockParentHash
545-
, "tipBlockIssuerVerificationKeyHash" .= tipBlockIssuerVkHashText]
545+
, "tipBlockIssuerVKeyHash" .= tipBlockIssuerVkHashText]
546546
forMachine dtal (ChainDB.SwitchedToAFork events selChangedInfo _old new) =
547547
mconcat $
548548
[ "kind" .= String "TraceAddBlockEvent.SwitchedToAFork"
@@ -606,8 +606,8 @@ instance ( LogFormatting (Header blk)
606606
, IntM "epoch" (fromIntegral (unEpochNo epoch))
607607
, CounterM "forks" (Just (if forkIt then 1 else 0))
608608
, PrometheusM "tipBlock" [("hash",tipBlockHash)
609-
,("parent hash",tipBlockParentHash)
610-
,("issuer verification key hash", tipBlockIssuerVkHashText)]
609+
,("parent_hash",tipBlockParentHash)
610+
,("issuer_VKey_hash", tipBlockIssuerVkHashText)]
611611
]
612612
asMetrics (ChainDB.AddedToCurrentChain _warnings selChangedInfo oldChain newChain) =
613613
let ChainInformation { .. } =
@@ -745,7 +745,14 @@ instance MetaTrace (ChainDB.TraceAddBlockEvent blk) where
745745
, ( "epoch"
746746
, "In which epoch is the tip of the current chain."
747747
)
748+
, ( "forks"
749+
, "counter for forks"
750+
)
751+
, ( "tipBlock"
752+
, "Hash vallues for tipBlockHash, tipBlockParentHash and tipBlockIssuerVkHashText"
753+
)
748754
]
755+
749756
metricsDocFor (Namespace _ ["AddedToCurrentChain"]) =
750757
[ ( "density"
751758
, mconcat
@@ -768,6 +775,9 @@ instance MetaTrace (ChainDB.TraceAddBlockEvent blk) where
768775
, ( "epoch"
769776
, "In which epoch is the tip of the current chain."
770777
)
778+
, ( "tipBlock"
779+
, "Hash vallues for tipBlockHash, tipBlockParentHash and tipBlockIssuerVkHashText"
780+
)
771781
]
772782
metricsDocFor _ = []
773783

0 commit comments

Comments
 (0)