Skip to content

Commit

Permalink
Merge pull request #5802 from IntersectMBO/jutaro/rename_metric
Browse files Browse the repository at this point in the history
Rename new 'can_forge_blocks' metric to 'forging_enabled'
  • Loading branch information
disassembler authored Apr 24, 2024
2 parents 4a500fa + daefc74 commit 6526694
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cardano-node/src/Cardano/Node/Tracing/Tracers/Startup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ instance ( Show (BlockNodeToNodeVersion blk)
]

asMetrics (BlockForgingUpdate b) =
[ IntM "can_forge_blocks"
[ IntM "forging_enabled"
(case b of
EnabledBlockForging -> 1
DisabledBlockForging -> 0
Expand Down Expand Up @@ -405,7 +405,8 @@ instance MetaTrace (StartupTrace blk) where
documentFor _ns = Nothing

metricsDocFor (Namespace _ ["BlockForgingUpdate"]) =
[("can_forge_blocks","Can this node forging blocks (is it provided with block forging credentials) 0 = no, 1 = yes")]
[("forging_enabled","Can this node forge blocks? (Is it provided with block forging credentials) 0 = no, 1 = yes")]


metricsDocFor _ = []

Expand Down
2 changes: 1 addition & 1 deletion cardano-node/src/Cardano/Tracing/Tracers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ mkTracers blockConfig tOpts@(TracingOnLegacy trSel) tr nodeKern ekgDirect enable
case mbEKGDirect of
Just ekgDirect' ->
case ev of
BlockForgingUpdate b -> sendEKGDirectInt ekgDirect' "can_forge_blocks"
BlockForgingUpdate b -> sendEKGDirectInt ekgDirect' "forging_enabled"
(case b of
EnabledBlockForging -> 1 :: Int
DisabledBlockForging -> 0 :: Int
Expand Down

0 comments on commit 6526694

Please sign in to comment.