Skip to content

Commit

Permalink
cardano-node: metrics comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jutaro committed Dec 13, 2024
1 parent 2146f13 commit 7c7c2f4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,8 @@ instance ( LogFormatting (Header blk)
, IntM "epoch" (fromIntegral (unEpochNo epoch))
, CounterM "forks" (Just (if forkIt then 1 else 0))
, PrometheusM "tipBlock" [("hash",tipBlockHash)
,("parent hash",tipBlockParentHash)
,("issuer verification key hash", tipBlockIssuerVkHashText)]
,("parent_hash",tipBlockParentHash)
,("issuer_VKey_hash", tipBlockIssuerVkHashText)]
]
asMetrics (ChainDB.AddedToCurrentChain _warnings selChangedInfo oldChain newChain) =
let ChainInformation { .. } =
Expand Down Expand Up @@ -745,7 +745,14 @@ instance MetaTrace (ChainDB.TraceAddBlockEvent blk) where
, ( "epoch"
, "In which epoch is the tip of the current chain."
)
, ( "forks"
, "counter for forks"
)
, ( "tipBlock"
, "Hash vallues for tipBlockHash, tipBlockParentHash and tipBlockIssuerVkHashText"
)
]

metricsDocFor (Namespace _ ["AddedToCurrentChain"]) =
[ ( "density"
, mconcat
Expand All @@ -768,6 +775,9 @@ instance MetaTrace (ChainDB.TraceAddBlockEvent blk) where
, ( "epoch"
, "In which epoch is the tip of the current chain."
)
, ( "tipBlock"
, "Hash vallues for tipBlockHash, tipBlockParentHash and tipBlockIssuerVkHashText"
)
]
metricsDocFor _ = []

Expand Down

0 comments on commit 7c7c2f4

Please sign in to comment.