Skip to content

Commit

Permalink
Patches
Browse files Browse the repository at this point in the history
  • Loading branch information
jutaro committed May 5, 2024
1 parent 004de7d commit cea856a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 8 additions & 6 deletions cardano-node/src/Cardano/Node/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ handleNodeWithTracers cmdPc nc0 p networkMagic blockType runP = do
blockForging <- snd (Api.protocolInfo runP)
traceWith (startupTracer tracers)
(BlockForgingUpdate (if null blockForging
then EnabledBlockForging
else DisabledBlockForging))
then DisabledBlockForging
else EnabledBlockForging))

handleSimpleNode blockType runP p2pMode tracers nc
(\nk -> do
Expand Down Expand Up @@ -281,14 +281,16 @@ handleNodeWithTracers cmdPc nc0 p networkMagic blockType runP = do
getStartupInfo nc p fp
>>= mapM_ (traceWith $ startupTracer tracers)

Debug.trace "before calling nodeVersionTracer" $ pure ()

traceWith (nodeVersionTracer tracers) getNodeVersion
Debug.trace "after calling nodeVersionTracer" $ pure ()



blockForging <- snd (Api.protocolInfo runP)
traceWith (startupTracer tracers)
(BlockForgingUpdate (if null blockForging
then EnabledBlockForging
else DisabledBlockForging))
(BlockForgingUpdate NotEffective)



-- We ignore peer logging thread if it dies, but it will be killed
Expand Down
10 changes: 4 additions & 6 deletions cardano-node/src/Cardano/Tracing/Tracers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -367,18 +367,19 @@ mkTracers blockConfig tOpts@(TracingOnLegacy trSel) tr nodeKern ekgDirect enable
_ -> pure ()
Nothing -> pure ()
traceVersionMetric :: Maybe EKGDirect -> NodeVersionTrace -> IO ()
traceVersionMetric mbEKGDirect ev =
traceVersionMetric mbEKGDirect ev = do

case mbEKGDirect of
Just ekgDirect' ->
case ev of
NodeVersionTrace {} ->
sendEKGDirectPrometheusLabel
ekgDirect'
"cardano_build_info"
"cardano.node.metrics.cardano_build_info"

(getCardanoBuildInfo ev)
Nothing -> pure ()


diffusionTracers = Diffusion.Tracers
{ Diffusion.dtMuxTracer = muxTracer
, Diffusion.dtHandshakeTracer = handshakeTracer
Expand Down Expand Up @@ -694,9 +695,6 @@ sendEKGDirectPrometheusLabel ekgDirect name labels = do
label pairs = "{" <> Text.intercalate "," pairs <> "} 1"
pair (k, v) = k <> "=\"" <> v <> "\""




--------------------------------------------------------------------------------
-- Consensus Tracers
--------------------------------------------------------------------------------
Expand Down

0 comments on commit cea856a

Please sign in to comment.