Skip to content

Commit

Permalink
cardano-node: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jutaro committed Nov 7, 2024
1 parent 4e0cabe commit d833fa1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
6 changes: 0 additions & 6 deletions cardano-node/src/Cardano/Node/Tracing/Documentation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ import Data.Proxy (Proxy (..))
import qualified Data.Text.IO as T
import GHC.Generics (Generic)
import Network.Mux (MuxTrace (..), WithMuxBearer (..))
import Network.Mux.Trace (TraceLabelPeer (..))
import qualified Network.Socket as Socket
import qualified Options.Applicative as Opt
import System.IO
Expand Down Expand Up @@ -317,10 +316,6 @@ docTracersFirstPhase condConfigFileName = do
blockFetchServerTrDoc <- documentTracer (blockFetchServerTr ::
Trace IO (TraceBlockFetchServerEvent blk))

servedBlockLatestTr <- servedBlockLatest mbTrEKG
servedBlockLatestTrDoc <- documentTracer (servedBlockLatestTr ::
Trace IO (TraceLabelPeer peer (TraceBlockFetchServerEvent blk)))

forgeKESInfoTr <- mkCardanoTracer
trBase trForward mbTrEKG
["Forge"]
Expand Down Expand Up @@ -718,7 +713,6 @@ docTracersFirstPhase condConfigFileName = do
<> blockFetchClientTrDoc
<> blockFetchClientMetricsDoc
<> blockFetchServerTrDoc
<> servedBlockLatestTrDoc
<> forgeKESInfoTrDoc
<> txInboundTrDoc
<> txOutboundTrDoc
Expand Down
13 changes: 3 additions & 10 deletions cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ instance LogFormatting ClientMetrics where

instance MetaTrace ClientMetrics where
namespaceFor _ = Namespace [] ["ClientMetrics"]
severityFor _ _ = Nothing
severityFor _ _ = Just Debug
documentFor _ = Just ""

metricsDocFor (Namespace _ ["ClientMetrics"]) =
Expand Down Expand Up @@ -882,7 +882,6 @@ instance MetaTrace (TraceBlockFetchServerEvent blk) where
metricsDocFor (Namespace [] ["SendBlock"]) =
[("served.block", "This counter metric indicates how many blocks this node has served.")
,("served.block.latest", "This counter metric indicates how many chain tip blocks this node has served.")]

metricsDocFor _ = []

documentFor (Namespace [] ["SendBlock"]) = Just
Expand All @@ -893,6 +892,7 @@ instance MetaTrace (TraceBlockFetchServerEvent blk) where

--------------------------------------------------------------------------------
-- Metric for server block latest
-- Only traces to EKG, no complete tracer!
--------------------------------------------------------------------------------

data ServedBlock = ServedBlock {
Expand Down Expand Up @@ -1284,20 +1284,13 @@ instance
, IntM "mempoolBytes" (fromIntegral . unByteSize32 . msNumBytes $ mpSz)
, CounterM "txsProcessedNum" (Just (fromIntegral $ length txs))
]
asMetrics (TraceMempoolManuallyRemovedTxs [] _txs1 mpSz) =
asMetrics (TraceMempoolManuallyRemovedTxs _txs _txs1 mpSz) =
[ IntM "txsInMempool" (fromIntegral $ msNumTxs mpSz)
, IntM "mempoolBytes" (fromIntegral . unByteSize32 . msNumBytes $ mpSz)
]
asMetrics (TraceMempoolManuallyRemovedTxs txs _txs1 mpSz) =
[ IntM "txsInMempool" (fromIntegral $ msNumTxs mpSz)
, IntM "mempoolBytes" (fromIntegral . unByteSize32 . msNumBytes $ mpSz)
, CounterM "txsProcessedNum" (Just (fromIntegral $ length txs))
]

asMetrics (TraceMempoolSynced (FallingEdgeWith duration)) =
[ IntM "txsSyncDuration" (round $ 1000 * duration)
]

asMetrics (TraceMempoolSynced RisingEdge) = []


Expand Down
2 changes: 1 addition & 1 deletion cardano-node/src/Cardano/Node/Tracing/Tracers/P2P.hs
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ instance MetaTrace (TracePeerSelection SockAddr) where
documentFor _ = Nothing

metricsDocFor (Namespace [] ["ChurnAction"]) =
[ ("peerSelection.churn.DecreasedActivePeers.duration", "")
[ ("peerSelection.churn.DecreasedActivePeers.duration", "")
, ("peerSelection.churn.DecreasedActiveBigLedgerPeers.duration", "")
, ("peerSelection.churn.DecreasedEstablishedPeers.duration", "")
, ("peerSelection.churn.DecreasedEstablishedBigLedgerPeers.duration", "")
Expand Down

0 comments on commit d833fa1

Please sign in to comment.