{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}

module Cardano.Node.Tracing.Tracers
  ( mkDispatchTracers
  ) where

import           Codec.CBOR.Read (DeserialiseFailure)

import           Cardano.Logging
import           Cardano.Logging.Resources.Types
import           Cardano.Prelude hiding (trace)

import           Cardano.Node.Tracing.Formatting ()
import           Cardano.Node.Tracing.Tracers.BlockReplayProgress
import           Cardano.Node.Tracing.Tracers.ChainDB
import           Cardano.Node.Tracing.Tracers.Consensus
import           Cardano.Node.Tracing.Tracers.Diffusion
import           Cardano.Node.Tracing.Tracers.ForgingThreadStats (docForgeStats, forgeThreadStats)
import           Cardano.Node.Tracing.Tracers.KESInfo
import           Cardano.Node.Tracing.Tracers.NodeToClient
import           Cardano.Node.Tracing.Tracers.NodeToNode
import           Cardano.Node.Tracing.Tracers.NonP2P
import           Cardano.Node.Tracing.Tracers.P2P
import           Cardano.Node.Tracing.Tracers.Peer
import           Cardano.Node.Tracing.Tracers.Shutdown
import           Cardano.Node.Tracing.Tracers.Startup
import           Trace.Forward.Utils.DataPoint (DataPoint)

import           Cardano.Node.Protocol.Types (SomeConsensusProtocol)
import           Cardano.Node.Queries (NodeKernelData)
import           Cardano.Node.Startup
import           Cardano.Node.TraceConstraints
import           Cardano.Node.Tracing
import           Cardano.Node.Tracing.Peers
import qualified Cardano.Node.Tracing.StateRep as SR
import           "contra-tracer" Control.Tracer (Tracer (..))

import           Ouroboros.Consensus.Ledger.Inspect (LedgerEvent)
import           Ouroboros.Consensus.MiniProtocol.ChainSync.Client (TraceChainSyncClientEvent)
import qualified Ouroboros.Consensus.Network.NodeToClient as NodeToClient
import qualified Ouroboros.Consensus.Network.NodeToClient as NtC
import qualified Ouroboros.Consensus.Network.NodeToNode as NodeToNode
import qualified Ouroboros.Consensus.Network.NodeToNode as NtN
import           Ouroboros.Consensus.Node (NetworkP2PMode (..))
import           Ouroboros.Consensus.Node.NetworkProtocolVersion
import qualified Ouroboros.Consensus.Node.Run as Consensus
import qualified Ouroboros.Consensus.Node.Tracers as Consensus
import qualified Ouroboros.Consensus.Storage.ChainDB as ChainDB
import qualified Ouroboros.Consensus.Storage.LedgerDB.OnDisk as LedgerDB

import           Network.Mux.Trace (TraceLabelPeer (..))

import qualified Ouroboros.Network.BlockFetch.ClientState as BlockFetch
import           Ouroboros.Network.ConnectionId (ConnectionId)
import qualified Ouroboros.Network.Diffusion as Diffusion
import qualified Ouroboros.Network.Diffusion.NonP2P as NonP2P
import qualified Ouroboros.Network.Diffusion.P2P as P2P
import           Ouroboros.Network.NodeToClient (LocalAddress)
import           Ouroboros.Network.NodeToNode (RemoteAddress)

-- | Construct tracers for all system components.
--
mkDispatchTracers
  :: forall blk p2p.
  ( Consensus.RunNode blk
  , TraceConstraints blk
  , LogFormatting (LedgerEvent blk)
  , LogFormatting
    (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
  )
  => NodeKernelData blk
  -> Trace IO FormattedMessage
  -> Trace IO FormattedMessage
  -> Maybe (Trace IO FormattedMessage)
  -> Trace IO DataPoint
  -> TraceConfig
  -> NetworkP2PMode p2p
  -> SomeConsensusProtocol
  -> IO (Tracers (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk p2p)
mkDispatchTracers :: NodeKernelData blk
-> Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> NetworkP2PMode p2p
-> SomeConsensusProtocol
-> IO
     (Tracers
        (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk p2p)
mkDispatchTracers NodeKernelData blk
nodeKernel Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
trDataPoint TraceConfig
trConfig NetworkP2PMode p2p
enableP2P SomeConsensusProtocol
p = do
    -- Some special tracers
    -- NodeInfo tracer
    Trace IO NodeInfo
nodeInfoDP <- Trace IO DataPoint
-> (NodeInfo -> [Text]) -> IO (Trace IO NodeInfo)
forall dp.
ToJSON dp =>
Trace IO DataPoint -> (dp -> [Text]) -> IO (Trace IO dp)
mkDataPointTracer
                Trace IO DataPoint
trDataPoint
                ([Text] -> NodeInfo -> [Text]
forall a b. a -> b -> a
const [Text
"NodeInfo"])
    TraceConfig -> Documented NodeInfo -> [Trace IO NodeInfo] -> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented NodeInfo
docNodeInfoTraceEvent [Trace IO NodeInfo
nodeInfoDP]

    Trace IO NodeStartupInfo
nodeStartupInfoDP <- Trace IO DataPoint
-> (NodeStartupInfo -> [Text]) -> IO (Trace IO NodeStartupInfo)
forall dp.
ToJSON dp =>
Trace IO DataPoint -> (dp -> [Text]) -> IO (Trace IO dp)
mkDataPointTracer
                Trace IO DataPoint
trDataPoint
                ([Text] -> NodeStartupInfo -> [Text]
forall a b. a -> b -> a
const [Text
"NodeStartupInfo"])
    TraceConfig
-> Documented NodeStartupInfo
-> [Trace IO NodeStartupInfo]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented NodeStartupInfo
docNodeStartupInfoTraceEvent [Trace IO NodeStartupInfo
nodeStartupInfoDP]

    Trace IO NodeState
nodeStateDP <- Trace IO DataPoint
-> (NodeState -> [Text]) -> IO (Trace IO NodeState)
forall dp.
ToJSON dp =>
Trace IO DataPoint -> (dp -> [Text]) -> IO (Trace IO dp)
mkDataPointTracer
                Trace IO DataPoint
trDataPoint
                ([Text] -> NodeState -> [Text]
forall a b. a -> b -> a
const [Text
"NodeState"])

    -- State tracer
    Trace IO NodeState
stateTr   <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (NodeState -> [Text])
-> (NodeState -> SeverityS)
-> (NodeState -> Privacy)
-> IO (Trace IO NodeState)
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"NodeState"]
                NodeState -> [Text]
SR.namesNodeState
                NodeState -> SeverityS
SR.severityNodeState
                NodeState -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented NodeState -> [Trace IO NodeState] -> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented NodeState
SR.docNodeState [Trace IO NodeState
stateTr]

    Trace IO NodePeers
nodePeersDP <- Trace IO DataPoint
-> (NodePeers -> [Text]) -> IO (Trace IO NodePeers)
forall dp.
ToJSON dp =>
Trace IO DataPoint -> (dp -> [Text]) -> IO (Trace IO dp)
mkDataPointTracer
                Trace IO DataPoint
trDataPoint
                ([Text] -> NodePeers -> [Text]
forall a b. a -> b -> a
const [Text
"NodePeers"])

    -- Peers tracer
    Trace IO [PeerT blk]
peersTr   <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> ([PeerT blk] -> [Text])
-> ([PeerT blk] -> SeverityS)
-> ([PeerT blk] -> Privacy)
-> IO (Trace IO [PeerT blk])
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"Peers", Text
"List"]
                [PeerT blk] -> [Text]
forall blk. [PeerT blk] -> [Text]
namesForPeers
                [PeerT blk] -> SeverityS
forall blk. [PeerT blk] -> SeverityS
severityPeers
                [PeerT blk] -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented [PeerT blk] -> [Trace IO [PeerT blk]] -> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented [PeerT blk]
forall blk. Documented [PeerT blk]
docPeers [Trace IO [PeerT blk]
peersTr]

    -- Resource tracer
    Trace IO ResourceStats
resourcesTr <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (ResourceStats -> [Text])
-> (ResourceStats -> SeverityS)
-> (ResourceStats -> Privacy)
-> IO (Trace IO ResourceStats)
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Resources"]
                ([Text] -> ResourceStats -> [Text]
forall a b. a -> b -> a
const [])
                (SeverityS -> ResourceStats -> SeverityS
forall a b. a -> b -> a
const SeverityS
Info)
                ResourceStats -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented ResourceStats -> [Trace IO ResourceStats] -> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented ResourceStats
docResourceStats [Trace IO ResourceStats
resourcesTr]

    -- BasicInfo tracer
    Trace IO (StartupTrace blk)
startupTr <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (StartupTrace blk -> [Text])
-> (StartupTrace blk -> SeverityS)
-> (StartupTrace blk -> Privacy)
-> IO (Trace IO (StartupTrace blk))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Startup"]
                StartupTrace blk -> [Text]
forall blk. StartupTrace blk -> [Text]
namesStartupInfo
                StartupTrace blk -> SeverityS
forall blk. StartupTrace blk -> SeverityS
severityStartupTracer
                StartupTrace blk -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (StartupTrace blk)
-> [Trace IO (StartupTrace blk)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (StartupTrace blk)
forall blk. Documented (StartupTrace blk)
docStartupInfo [Trace IO (StartupTrace blk)
startupTr]

    Trace IO ShutdownTrace
shutdownTr <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (ShutdownTrace -> [Text])
-> (ShutdownTrace -> SeverityS)
-> (ShutdownTrace -> Privacy)
-> IO (Trace IO ShutdownTrace)
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Shutdown"]
                ShutdownTrace -> [Text]
namesForShutdown
                ShutdownTrace -> SeverityS
severityShutdown
                ShutdownTrace -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented ShutdownTrace -> [Trace IO ShutdownTrace] -> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented ShutdownTrace
docShutdown [Trace IO ShutdownTrace
shutdownTr]

    Trace IO (TraceEvent blk)
chainDBTr <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceEvent blk -> [Text])
-> (TraceEvent blk -> SeverityS)
-> (TraceEvent blk -> Privacy)
-> (Trace IO (TraceEvent blk) -> IO (Trace IO (TraceEvent blk)))
-> IO (Trace IO (TraceEvent blk))
forall evt evt1.
LogFormatting evt1 =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt1 -> [Text])
-> (evt1 -> SeverityS)
-> (evt1 -> Privacy)
-> (Trace IO evt1 -> IO (Trace IO evt))
-> IO (Trace IO evt)
mkCardanoTracer'
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"ChainDB"]
                TraceEvent blk -> [Text]
forall blk. TraceEvent blk -> [Text]
namesForChainDBTraceEvents
                TraceEvent blk -> SeverityS
forall blk. TraceEvent blk -> SeverityS
severityChainDB
                TraceEvent blk -> Privacy
forall a. a -> Privacy
allPublic
                Trace IO (TraceEvent blk) -> IO (Trace IO (TraceEvent blk))
forall blk.
Trace IO (TraceEvent blk) -> IO (Trace IO (TraceEvent blk))
withAddedToCurrentChainEmptyLimited
    TraceConfig
-> Documented (TraceEvent blk)
-> [Trace IO (TraceEvent blk)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TraceEvent blk)
forall blk. Documented (TraceEvent blk)
docChainDBTraceEvent [Trace IO (TraceEvent blk)
chainDBTr]

    Trace IO ReplayBlockStats
replayBlockTr <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (ReplayBlockStats -> [Text])
-> (ReplayBlockStats -> SeverityS)
-> (ReplayBlockStats -> Privacy)
-> IO (Trace IO ReplayBlockStats)
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"ChainDB", Text
"ReplayBlock"]
                ReplayBlockStats -> [Text]
namesForReplayBlockStats
                ReplayBlockStats -> SeverityS
severityReplayBlockStats
                ReplayBlockStats -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented ReplayBlockStats
-> [Trace IO ReplayBlockStats]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented ReplayBlockStats
docReplayedBlock [Trace IO ReplayBlockStats
replayBlockTr]

    -- This tracer handles replayed blocks specially
    Trace IO (TraceEvent blk)
replayBlockTr' <- Trace IO ReplayBlockStats -> IO (Trace IO (TraceEvent blk))
forall blk.
Trace IO ReplayBlockStats -> IO (Trace IO (TraceEvent blk))
withReplayedBlock Trace IO ReplayBlockStats
replayBlockTr
    -- Filter out replayed blocks for this tracer
    let chainDBTr' :: Trace IO (TraceEvent blk)
chainDBTr' = ((LoggingContext, TraceEvent blk) -> Bool)
-> Trace IO (TraceEvent blk) -> Trace IO (TraceEvent blk)
forall (m :: * -> *) a.
Monad m =>
((LoggingContext, a) -> Bool) -> Trace m a -> Trace m a
filterTrace
                      (\case (LoggingContext
_, ChainDB.TraceLedgerReplayEvent
                                            LedgerDB.ReplayedBlock {}) -> Bool
False
                             (LoggingContext
_, TraceEvent blk
_) -> Bool
True)
                      Trace IO (TraceEvent blk)
chainDBTr

    Tracers
  IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk
consensusTr :: Consensus.Tracers
                    IO
                    (ConnectionId RemoteAddress)
                    (ConnectionId LocalAddress)
                    blk <-
      Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> NodeKernelData blk
-> IO
     (Tracers
        IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk)
forall blk.
(RunNode blk, TraceConstraints blk,
 LogFormatting
   (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))) =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> NodeKernelData blk
-> IO
     (Tracers
        IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk)
mkConsensusTracers Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
trDataPoint TraceConfig
trConfig NodeKernelData blk
nodeKernel

    Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure
nodeToClientTr :: NodeToClient.Tracers
                    IO
                    (ConnectionId LocalAddress)
                    blk
                    DeserialiseFailure <-
      Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> IO
     (Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure)
forall blk.
RunNode blk =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> IO
     (Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure)
mkNodeToClientTracers Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
trDataPoint TraceConfig
trConfig

    Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure
nodeToNodeTr :: NodeToNode.Tracers
                    IO
                    (ConnectionId RemoteAddress)
                    blk
                    DeserialiseFailure <-
      Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> IO
     (Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure)
forall blk.
(RunNode blk, TraceConstraints blk) =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> IO
     (Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure)
mkNodeToNodeTracers Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
trDataPoint TraceConfig
trConfig

    Tracers
  RemoteAddress NodeToNodeVersion LocalAddress NodeToClientVersion IO
diffusionTr :: Diffusion.Tracers
                    RemoteAddress
                    NodeToNodeVersion
                    LocalAddress
                    NodeToClientVersion
                    IO <-
      Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> IO
     (Tracers
        RemoteAddress
        NodeToNodeVersion
        LocalAddress
        NodeToClientVersion
        IO)
mkDiffusionTracers Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
trDataPoint TraceConfig
trConfig

    ExtraTracers p2p
diffusionTrExtra :: Diffusion.ExtraTracers p2p <-
      Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> NetworkP2PMode p2p
-> IO (ExtraTracers p2p)
forall (p2p :: P2P).
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> NetworkP2PMode p2p
-> IO (ExtraTracers p2p)
mkDiffusionTracersExtra Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
trDataPoint TraceConfig
trConfig NetworkP2PMode p2p
enableP2P
    Tracers
  (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk p2p
-> IO
     (Tracers
        (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk p2p)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Tracers :: forall peer localPeer blk (p2p :: P2P).
Tracer IO (TraceEvent blk)
-> Tracers IO peer localPeer blk
-> Tracers IO peer blk DeserialiseFailure
-> Tracers IO localPeer blk DeserialiseFailure
-> Tracers
     RemoteAddress NodeToNodeVersion LocalAddress NodeToClientVersion IO
-> ExtraTracers p2p
-> Tracer IO (StartupTrace blk)
-> Tracer IO ShutdownTrace
-> Tracer IO NodeInfo
-> Tracer IO NodeStartupInfo
-> Tracer IO NodeState
-> Tracer IO ResourceStats
-> Tracer IO [PeerT blk]
-> Tracers peer localPeer blk p2p
Tracers
      { chainDBTracer :: Tracer IO (TraceEvent blk)
chainDBTracer = (TraceEvent blk -> IO ()) -> Tracer IO (TraceEvent blk)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO (TraceEvent blk) -> TraceEvent blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceEvent blk)
chainDBTr')
                     Tracer IO (TraceEvent blk)
-> Tracer IO (TraceEvent blk) -> Tracer IO (TraceEvent blk)
forall a. Semigroup a => a -> a -> a
<> (TraceEvent blk -> IO ()) -> Tracer IO (TraceEvent blk)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO (TraceEvent blk) -> TraceEvent blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceEvent blk)
replayBlockTr')
                     Tracer IO (TraceEvent blk)
-> Tracer IO (TraceEvent blk) -> Tracer IO (TraceEvent blk)
forall a. Semigroup a => a -> a -> a
<> (TraceEvent blk -> IO ()) -> Tracer IO (TraceEvent blk)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (SomeConsensusProtocol
-> Trace IO NodeState -> TraceEvent blk -> IO ()
forall blk.
SomeConsensusProtocol
-> Trace IO NodeState -> TraceEvent blk -> IO ()
SR.traceNodeStateChainDB SomeConsensusProtocol
p Trace IO NodeState
nodeStateDP)
      , consensusTracers :: Tracers
  IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk
consensusTracers = Tracers
  IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk
consensusTr
      , nodeToClientTracers :: Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure
nodeToClientTracers = Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure
nodeToClientTr
      , nodeToNodeTracers :: Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure
nodeToNodeTracers = Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure
nodeToNodeTr
      , diffusionTracers :: Tracers
  RemoteAddress NodeToNodeVersion LocalAddress NodeToClientVersion IO
diffusionTracers = Tracers
  RemoteAddress NodeToNodeVersion LocalAddress NodeToClientVersion IO
diffusionTr
      , diffusionTracersExtra :: ExtraTracers p2p
diffusionTracersExtra = ExtraTracers p2p
diffusionTrExtra
      , startupTracer :: Tracer IO (StartupTrace blk)
startupTracer   = (StartupTrace blk -> IO ()) -> Tracer IO (StartupTrace blk)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO (StartupTrace blk) -> StartupTrace blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (StartupTrace blk)
startupTr)
                        Tracer IO (StartupTrace blk)
-> Tracer IO (StartupTrace blk) -> Tracer IO (StartupTrace blk)
forall a. Semigroup a => a -> a -> a
<> (StartupTrace blk -> IO ()) -> Tracer IO (StartupTrace blk)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO NodeState -> StartupTrace blk -> IO ()
forall blk. Trace IO NodeState -> StartupTrace blk -> IO ()
SR.traceNodeStateStartup Trace IO NodeState
nodeStateDP)
      , shutdownTracer :: Tracer IO ShutdownTrace
shutdownTracer  = (ShutdownTrace -> IO ()) -> Tracer IO ShutdownTrace
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO ShutdownTrace -> ShutdownTrace -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO ShutdownTrace
shutdownTr)
                        Tracer IO ShutdownTrace
-> Tracer IO ShutdownTrace -> Tracer IO ShutdownTrace
forall a. Semigroup a => a -> a -> a
<> (ShutdownTrace -> IO ()) -> Tracer IO ShutdownTrace
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO NodeState -> ShutdownTrace -> IO ()
SR.traceNodeStateShutdown Trace IO NodeState
nodeStateDP)
      , nodeInfoTracer :: Tracer IO NodeInfo
nodeInfoTracer  = (NodeInfo -> IO ()) -> Tracer IO NodeInfo
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO NodeInfo -> NodeInfo -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO NodeInfo
nodeInfoDP)
      , nodeStartupInfoTracer :: Tracer IO NodeStartupInfo
nodeStartupInfoTracer = (NodeStartupInfo -> IO ()) -> Tracer IO NodeStartupInfo
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO NodeStartupInfo -> NodeStartupInfo -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO NodeStartupInfo
nodeStartupInfoDP)
      , nodeStateTracer :: Tracer IO NodeState
nodeStateTracer = (NodeState -> IO ()) -> Tracer IO NodeState
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO NodeState -> NodeState -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO NodeState
stateTr)
                        Tracer IO NodeState -> Tracer IO NodeState -> Tracer IO NodeState
forall a. Semigroup a => a -> a -> a
<> (NodeState -> IO ()) -> Tracer IO NodeState
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO NodeState -> NodeState -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO NodeState
nodeStateDP)
      , resourcesTracer :: Tracer IO ResourceStats
resourcesTracer = (ResourceStats -> IO ()) -> Tracer IO ResourceStats
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO ResourceStats -> ResourceStats -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO ResourceStats
resourcesTr)
      , peersTracer :: Tracer IO [PeerT blk]
peersTracer     = ([PeerT blk] -> IO ()) -> Tracer IO [PeerT blk]
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO [PeerT blk] -> [PeerT blk] -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO [PeerT blk]
peersTr)
                        Tracer IO [PeerT blk]
-> Tracer IO [PeerT blk] -> Tracer IO [PeerT blk]
forall a. Semigroup a => a -> a -> a
<> ([PeerT blk] -> IO ()) -> Tracer IO [PeerT blk]
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (Trace IO NodePeers -> [PeerT blk] -> IO ()
forall blk. Trace IO NodePeers -> [PeerT blk] -> IO ()
traceNodePeers Trace IO NodePeers
nodePeersDP)
    }

mkConsensusTracers :: forall blk.
  ( Consensus.RunNode blk
  , TraceConstraints blk
  , LogFormatting (TraceLabelPeer
                    (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
  )
  => Trace IO FormattedMessage
  -> Trace IO FormattedMessage
  -> Maybe (Trace IO FormattedMessage)
  -> Trace IO DataPoint
  -> TraceConfig
  -> NodeKernelData blk
  -> IO (Consensus.Tracers IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk)
mkConsensusTracers :: Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> NodeKernelData blk
-> IO
     (Tracers
        IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk)
mkConsensusTracers Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
_trDataPoint TraceConfig
trConfig NodeKernelData blk
nodeKernel = do
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
chainSyncClientTr  <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                 [Text
"ChainSync", Text
"Client"]
                TraceLabelPeer
  (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)
-> [Text]
forall peer blk.
TraceLabelPeer peer (TraceChainSyncClientEvent blk) -> [Text]
namesForChainSyncClientEvent
                TraceLabelPeer
  (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)
-> SeverityS
forall peer blk.
TraceLabelPeer peer (TraceChainSyncClientEvent blk) -> SeverityS
severityChainSyncClientEvent
                TraceLabelPeer
  (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
forall peer blk.
Documented (TraceLabelPeer peer (TraceChainSyncClientEvent blk))
docChainSyncClientEvent [Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
chainSyncClientTr]
    Trace IO (TraceChainSyncServerEvent blk)
chainSyncServerHeaderTr <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceChainSyncServerEvent blk -> [Text])
-> (TraceChainSyncServerEvent blk -> SeverityS)
-> (TraceChainSyncServerEvent blk -> Privacy)
-> IO (Trace IO (TraceChainSyncServerEvent blk))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"ChainSync", Text
"ServerHeader"]
                TraceChainSyncServerEvent blk -> [Text]
forall blk. TraceChainSyncServerEvent blk -> [Text]
namesForChainSyncServerEvent
                TraceChainSyncServerEvent blk -> SeverityS
forall blk. TraceChainSyncServerEvent blk -> SeverityS
severityChainSyncServerEvent
                TraceChainSyncServerEvent blk -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (TraceChainSyncServerEvent blk)
-> [Trace IO (TraceChainSyncServerEvent blk)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TraceChainSyncServerEvent blk)
forall blk. Documented (TraceChainSyncServerEvent blk)
docChainSyncServerEventHeader [Trace IO (TraceChainSyncServerEvent blk)
chainSyncServerHeaderTr]

    -- Special chainSync server metrics, send directly to EKG
    -- any server header event advances the counter
    let chainSyncServerHeaderMetricsTr :: Trace IO (TraceChainSyncServerEvent blk)
chainSyncServerHeaderMetricsTr =
           (TraceChainSyncServerEvent blk -> FormattedMessage)
-> Trace IO FormattedMessage
-> Trace IO (TraceChainSyncServerEvent blk)
forall (f :: * -> *) a b. Contravariant f => (a -> b) -> f b -> f a
contramap
              (FormattedMessage
-> TraceChainSyncServerEvent blk -> FormattedMessage
forall a b. a -> b -> a
const
                ([Metric] -> FormattedMessage
FormattedMetrics
                  [Text -> Maybe Int -> Metric
CounterM Text
"ChainSync.HeadersServed" Maybe Int
forall a. Maybe a
Nothing]))
              (Maybe (Trace IO FormattedMessage) -> Trace IO FormattedMessage
mkMetricsTracer Maybe (Trace IO FormattedMessage)
mbTrEKG)

    Trace IO (TraceChainSyncServerEvent blk)
chainSyncServerBlockTr <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceChainSyncServerEvent blk -> [Text])
-> (TraceChainSyncServerEvent blk -> SeverityS)
-> (TraceChainSyncServerEvent blk -> Privacy)
-> IO (Trace IO (TraceChainSyncServerEvent blk))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"ChainSync", Text
"ServerBlock"]
                TraceChainSyncServerEvent blk -> [Text]
forall blk. TraceChainSyncServerEvent blk -> [Text]
namesForChainSyncServerEvent
                TraceChainSyncServerEvent blk -> SeverityS
forall blk. TraceChainSyncServerEvent blk -> SeverityS
severityChainSyncServerEvent
                TraceChainSyncServerEvent blk -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (TraceChainSyncServerEvent blk)
-> [Trace IO (TraceChainSyncServerEvent blk)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TraceChainSyncServerEvent blk)
forall blk. Documented (TraceChainSyncServerEvent blk)
docChainSyncServerEventBlock [Trace IO (TraceChainSyncServerEvent blk)
chainSyncServerBlockTr]
    Trace
  IO
  [TraceLabelPeer
     (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
blockFetchDecisionTr  <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> ([TraceLabelPeer
       (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
    -> [Text])
-> ([TraceLabelPeer
       (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
    -> SeverityS)
-> ([TraceLabelPeer
       (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
    -> Privacy)
-> IO
     (Trace
        IO
        [TraceLabelPeer
           (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])])
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"BlockFetch", Text
"Decision"]
                [TraceLabelPeer
   (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
-> [Text]
forall peer header.
[TraceLabelPeer peer (FetchDecision [Point header])] -> [Text]
namesForBlockFetchDecision
                [TraceLabelPeer
   (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
-> SeverityS
forall peer header.
[TraceLabelPeer peer (FetchDecision [Point header])] -> SeverityS
severityBlockFetchDecision
                [TraceLabelPeer
   (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
-> Privacy
forall a. a -> Privacy
allConfidential
    TraceConfig
-> Documented
     [TraceLabelPeer
        (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
-> [Trace
      IO
      [TraceLabelPeer
         (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  [TraceLabelPeer
     (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
forall remotePeer blk.
Documented
  [TraceLabelPeer remotePeer (FetchDecision [Point (Header blk)])]
docBlockFetchDecision [Trace
  IO
  [TraceLabelPeer
     (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
blockFetchDecisionTr]
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
blockFetchClientTr  <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"BlockFetch", Text
"Client"]
                TraceLabelPeer
  (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
-> [Text]
forall peer header.
TraceLabelPeer peer (TraceFetchClientState header) -> [Text]
namesForBlockFetchClient
                TraceLabelPeer
  (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
-> SeverityS
forall peer header.
TraceLabelPeer peer (TraceFetchClientState header) -> SeverityS
severityBlockFetchClient
                TraceLabelPeer
  (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
forall remotePeer blk.
Documented
  (TraceLabelPeer remotePeer (TraceFetchClientState (Header blk)))
docBlockFetchClient [Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
blockFetchClientTr]

    -- Special blockFetch client metrics, send directly to EKG
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
blockFetchClientMetricsTr <- do
        Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
tr1 <- (ClientMetrics
 -> LoggingContext
 -> TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
 -> IO ClientMetrics)
-> ClientMetrics
-> Trace
     IO
     (Folding
        (TraceLabelPeer
           (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
        ClientMetrics)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))))
forall a acc (m :: * -> *).
MonadUnliftIO m =>
(acc -> LoggingContext -> a -> m acc)
-> acc -> Trace m (Folding a acc) -> m (Trace m a)
foldMTraceM ClientMetrics
-> LoggingContext
-> TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
-> IO ClientMetrics
forall peer header.
ClientMetrics
-> LoggingContext
-> TraceLabelPeer peer (TraceFetchClientState header)
-> IO ClientMetrics
calculateBlockFetchClientMetrics ClientMetrics
initialClientMetrics
                    (Text
-> Trace IO FormattedMessage
-> Trace
     IO
     (Folding
        (TraceLabelPeer
           (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
        ClientMetrics)
forall a (m :: * -> *).
(LogFormatting a, MonadIO m) =>
Text -> Trace m FormattedMessage -> Trace m a
metricsFormatter Text
""
                      (Maybe (Trace IO FormattedMessage) -> Trace IO FormattedMessage
mkMetricsTracer Maybe (Trace IO FormattedMessage)
mbTrEKG))
        Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))))
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Trace
   IO
   (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
 -> IO
      (Trace
         IO
         (TraceLabelPeer
            (ConnectionId RemoteAddress)
            (TraceFetchClientState (Header blk)))))
-> Trace
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))))
forall a b. (a -> b) -> a -> b
$ ((LoggingContext,
  TraceLabelPeer
    (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
 -> Bool)
-> Trace
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
-> Trace
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
forall (m :: * -> *) a.
Monad m =>
((LoggingContext, a) -> Bool) -> Trace m a -> Trace m a
filterTrace (\ (LoggingContext
_, TraceLabelPeer ConnectionId RemoteAddress
_ TraceFetchClientState (Header blk)
m) -> case TraceFetchClientState (Header blk)
m of
                                              BlockFetch.CompletedBlockFetch {} -> Bool
True
                                              TraceFetchClientState (Header blk)
_ -> Bool
False)
                 Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
tr1

    Trace IO (TraceBlockFetchServerEvent blk)
blockFetchServerTr  <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceBlockFetchServerEvent blk -> [Text])
-> (TraceBlockFetchServerEvent blk -> SeverityS)
-> (TraceBlockFetchServerEvent blk -> Privacy)
-> IO (Trace IO (TraceBlockFetchServerEvent blk))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"BlockFetch", Text
"Server"]
                TraceBlockFetchServerEvent blk -> [Text]
forall blk. TraceBlockFetchServerEvent blk -> [Text]
namesForBlockFetchServer
                TraceBlockFetchServerEvent blk -> SeverityS
forall blk. TraceBlockFetchServerEvent blk -> SeverityS
severityBlockFetchServer
                TraceBlockFetchServerEvent blk -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (TraceBlockFetchServerEvent blk)
-> [Trace IO (TraceBlockFetchServerEvent blk)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TraceBlockFetchServerEvent blk)
forall blk. Documented (TraceBlockFetchServerEvent blk)
docBlockFetchServer [Trace IO (TraceBlockFetchServerEvent blk)
blockFetchServerTr]
    Trace IO (TraceLabelCreds KESInfo)
forgeKESInfoTr  <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelCreds KESInfo -> [Text])
-> (TraceLabelCreds KESInfo -> SeverityS)
-> (TraceLabelCreds KESInfo -> Privacy)
-> IO (Trace IO (TraceLabelCreds KESInfo))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Forge", Text
"KESInfo"]
                TraceLabelCreds KESInfo -> [Text]
namesForKESInfo
                TraceLabelCreds KESInfo -> SeverityS
severityKESInfo
                TraceLabelCreds KESInfo -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (TraceLabelCreds KESInfo)
-> [Trace IO (TraceLabelCreds KESInfo)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TraceLabelCreds KESInfo)
docForgeKESInfo [Trace IO (TraceLabelCreds KESInfo)
forgeKESInfoTr]
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
txInboundTr  <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress)
           (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"TxSubmission", Text
"TxInbound"]
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
-> [Text]
forall peer blk.
TraceLabelPeer
  peer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
-> [Text]
namesForTxInbound
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
-> SeverityS
forall peer blk.
TraceLabelPeer
  peer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
-> SeverityS
severityTxInbound
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
forall remotePeer txid tx.
Documented
  (TraceLabelPeer remotePeer (TraceTxSubmissionInbound txid tx))
docTxInbound [Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
txInboundTr]
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
txOutboundTr  <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress)
           (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"TxSubmission", Text
"TxOutbound"]
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
-> [Text]
forall peer blk.
TraceLabelPeer
  peer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
-> [Text]
namesForTxOutbound
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
-> SeverityS
forall peer blk.
TraceLabelPeer
  peer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
-> SeverityS
severityTxOutbound
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
forall remotePeer txid tx.
Documented
  (TraceLabelPeer remotePeer (TraceTxSubmissionOutbound txid tx))
docTxOutbound [Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
txOutboundTr]
    Trace IO (TraceLocalTxSubmissionServerEvent blk)
localTxSubmissionServerTr <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLocalTxSubmissionServerEvent blk -> [Text])
-> (TraceLocalTxSubmissionServerEvent blk -> SeverityS)
-> (TraceLocalTxSubmissionServerEvent blk -> Privacy)
-> IO (Trace IO (TraceLocalTxSubmissionServerEvent blk))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"TxSubmission", Text
"LocalServer"]
                TraceLocalTxSubmissionServerEvent blk -> [Text]
forall blk. TraceLocalTxSubmissionServerEvent blk -> [Text]
namesForLocalTxSubmissionServer
                TraceLocalTxSubmissionServerEvent blk -> SeverityS
forall blk. TraceLocalTxSubmissionServerEvent blk -> SeverityS
severityLocalTxSubmissionServer
                TraceLocalTxSubmissionServerEvent blk -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (TraceLocalTxSubmissionServerEvent blk)
-> [Trace IO (TraceLocalTxSubmissionServerEvent blk)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TraceLocalTxSubmissionServerEvent blk)
forall blk. Documented (TraceLocalTxSubmissionServerEvent blk)
docLocalTxSubmissionServer [Trace IO (TraceLocalTxSubmissionServerEvent blk)
localTxSubmissionServerTr]
    Trace IO (TraceEventMempool blk)
mempoolTr   <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceEventMempool blk -> [Text])
-> (TraceEventMempool blk -> SeverityS)
-> (TraceEventMempool blk -> Privacy)
-> IO (Trace IO (TraceEventMempool blk))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Mempool"]
                TraceEventMempool blk -> [Text]
forall blk. TraceEventMempool blk -> [Text]
namesForMempool
                TraceEventMempool blk -> SeverityS
forall blk. TraceEventMempool blk -> SeverityS
severityMempool
                TraceEventMempool blk -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (TraceEventMempool blk)
-> [Trace IO (TraceEventMempool blk)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TraceEventMempool blk)
forall blk. Documented (TraceEventMempool blk)
docMempool [Trace IO (TraceEventMempool blk)
mempoolTr]
    Trace IO (ForgeTracerType blk)
forgeTr    <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (ForgeTracerType blk -> [Text])
-> (ForgeTracerType blk -> SeverityS)
-> (ForgeTracerType blk -> Privacy)
-> (Trace IO (ForgeTracerType blk)
    -> IO (Trace IO (ForgeTracerType blk)))
-> IO (Trace IO (ForgeTracerType blk))
forall evt evt1.
LogFormatting evt1 =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt1 -> [Text])
-> (evt1 -> SeverityS)
-> (evt1 -> Privacy)
-> (Trace IO evt1 -> IO (Trace IO evt))
-> IO (Trace IO evt)
mkCardanoTracer'
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Forge", Text
"Loop"]
                ForgeTracerType blk -> [Text]
forall blk. ForgeTracerType blk -> [Text]
namesForForge
                ForgeTracerType blk -> SeverityS
forall blk. ForgeTracerType blk -> SeverityS
severityForge
                ForgeTracerType blk -> Privacy
forall a. a -> Privacy
allPublic
                (NodeKernelData blk
-> Trace IO (ForgeTracerType blk)
-> IO (Trace IO (ForgeTracerType blk))
forall blk.
(IsLedger (LedgerState blk), LedgerQueries blk,
 HasHeader (Header blk)) =>
NodeKernelData blk
-> Trace IO (ForgeTracerType blk)
-> IO (Trace IO (ForgeTracerType blk))
forgeTracerTransform NodeKernelData blk
nodeKernel)
    Trace IO (ForgeTracerType blk)
forgeThreadStatsTr <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (ForgingStats -> [Text])
-> (ForgingStats -> SeverityS)
-> (ForgingStats -> Privacy)
-> (Trace IO ForgingStats -> IO (Trace IO (ForgeTracerType blk)))
-> IO (Trace IO (ForgeTracerType blk))
forall evt evt1.
LogFormatting evt1 =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt1 -> [Text])
-> (evt1 -> SeverityS)
-> (evt1 -> Privacy)
-> (Trace IO evt1 -> IO (Trace IO evt))
-> IO (Trace IO evt)
mkCardanoTracer'
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Forge", Text
"Stats"]
                ForgingStats -> [Text]
namesForForge2
                ForgingStats -> SeverityS
severityForge2
                ForgingStats -> Privacy
forall a. a -> Privacy
allPublic
                Trace IO ForgingStats -> IO (Trace IO (ForgeTracerType blk))
forall blk.
Trace IO ForgingStats -> IO (Trace IO (ForgeTracerType blk))
forgeThreadStats
    TraceConfig
-> Documented (ForgeTracerType blk)
-> [Trace IO (ForgeTracerType blk)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (ForgeTracerType blk)
forall blk.
Documented
  (Either (TraceForgeEvent blk) TraceStartLeadershipCheckPlus)
docForge [Trace IO (ForgeTracerType blk)
forgeTr]
    TraceConfig
-> Documented (ForgeTracerType blk)
-> [Trace IO (ForgeTracerType blk)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (ForgeTracerType blk)
forall blk.
Documented
  (Either (TraceForgeEvent blk) TraceStartLeadershipCheckPlus)
docForgeStats [Trace IO (ForgeTracerType blk)
forgeThreadStatsTr]
    Trace IO (TraceBlockchainTimeEvent UTCTime)
blockchainTimeTr   <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceBlockchainTimeEvent UTCTime -> [Text])
-> (TraceBlockchainTimeEvent UTCTime -> SeverityS)
-> (TraceBlockchainTimeEvent UTCTime -> Privacy)
-> IO (Trace IO (TraceBlockchainTimeEvent UTCTime))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"BlockchainTime"]
                TraceBlockchainTimeEvent UTCTime -> [Text]
forall t. TraceBlockchainTimeEvent t -> [Text]
namesForBlockchainTime
                TraceBlockchainTimeEvent UTCTime -> SeverityS
forall t. TraceBlockchainTimeEvent t -> SeverityS
severityBlockchainTime
                TraceBlockchainTimeEvent UTCTime -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (TraceBlockchainTimeEvent UTCTime)
-> [Trace IO (TraceBlockchainTimeEvent UTCTime)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TraceBlockchainTimeEvent UTCTime)
forall t. Documented (TraceBlockchainTimeEvent t)
docBlockchainTime [Trace IO (TraceBlockchainTimeEvent UTCTime)
blockchainTimeTr]
    Trace IO (TraceKeepAliveClient (ConnectionId RemoteAddress))
keepAliveClientTr  <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceKeepAliveClient (ConnectionId RemoteAddress) -> [Text])
-> (TraceKeepAliveClient (ConnectionId RemoteAddress) -> SeverityS)
-> (TraceKeepAliveClient (ConnectionId RemoteAddress) -> Privacy)
-> IO
     (Trace IO (TraceKeepAliveClient (ConnectionId RemoteAddress)))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"KeepAliveClient"]
                TraceKeepAliveClient (ConnectionId RemoteAddress) -> [Text]
forall peer. TraceKeepAliveClient peer -> [Text]
namesForKeepAliveClient
                TraceKeepAliveClient (ConnectionId RemoteAddress) -> SeverityS
forall peer. TraceKeepAliveClient peer -> SeverityS
severityKeepAliveClient
                TraceKeepAliveClient (ConnectionId RemoteAddress) -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (TraceKeepAliveClient (ConnectionId RemoteAddress))
-> [Trace IO (TraceKeepAliveClient (ConnectionId RemoteAddress))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TraceKeepAliveClient (ConnectionId RemoteAddress))
forall peer. Documented (TraceKeepAliveClient peer)
docKeepAliveClient [Trace IO (TraceKeepAliveClient (ConnectionId RemoteAddress))
keepAliveClientTr]
    Tracers
  IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk
-> IO
     (Tracers
        IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Tracers
   IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk
 -> IO
      (Tracers
         IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk))
-> Tracers
     IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk
-> IO
     (Tracers
        IO (ConnectionId RemoteAddress) (ConnectionId LocalAddress) blk)
forall a b. (a -> b) -> a -> b
$ Tracers :: forall remotePeer localPeer blk (f :: * -> *).
f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
-> f (TraceChainSyncServerEvent blk)
-> f (TraceChainSyncServerEvent blk)
-> f [TraceLabelPeer
        remotePeer (FetchDecision [Point (Header blk)])]
-> f (TraceLabelPeer
        remotePeer (TraceFetchClientState (Header blk)))
-> f (TraceBlockFetchServerEvent blk)
-> f (TraceLabelPeer
        remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
-> f (TraceLabelPeer
        remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
-> f (TraceLocalTxSubmissionServerEvent blk)
-> f (TraceEventMempool blk)
-> f (TraceLabelCreds (TraceForgeEvent blk))
-> f (TraceBlockchainTimeEvent UTCTime)
-> f (TraceLabelCreds (ForgeStateInfo blk))
-> f (TraceKeepAliveClient remotePeer)
-> Tracers' remotePeer localPeer blk f
Consensus.Tracers
      { chainSyncClientTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
Consensus.chainSyncClientTracer = (TraceLabelPeer
   (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)))
-> (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
-> TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk)
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceChainSyncClientEvent blk))
chainSyncClientTr
      , chainSyncServerHeaderTracer :: Tracer IO (TraceChainSyncServerEvent blk)
Consensus.chainSyncServerHeaderTracer = (TraceChainSyncServerEvent blk -> IO ())
-> Tracer IO (TraceChainSyncServerEvent blk)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceChainSyncServerEvent blk -> IO ())
 -> Tracer IO (TraceChainSyncServerEvent blk))
-> (TraceChainSyncServerEvent blk -> IO ())
-> Tracer IO (TraceChainSyncServerEvent blk)
forall a b. (a -> b) -> a -> b
$
           Trace IO (TraceChainSyncServerEvent blk)
-> TraceChainSyncServerEvent blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceChainSyncServerEvent blk)
chainSyncServerHeaderTr
          (TraceChainSyncServerEvent blk -> IO ())
-> (TraceChainSyncServerEvent blk -> IO ())
-> TraceChainSyncServerEvent blk
-> IO ()
forall a. Semigroup a => a -> a -> a
<> Trace IO (TraceChainSyncServerEvent blk)
-> TraceChainSyncServerEvent blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceChainSyncServerEvent blk)
chainSyncServerHeaderMetricsTr
      , chainSyncServerBlockTracer :: Tracer IO (TraceChainSyncServerEvent blk)
Consensus.chainSyncServerBlockTracer = (TraceChainSyncServerEvent blk -> IO ())
-> Tracer IO (TraceChainSyncServerEvent blk)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceChainSyncServerEvent blk -> IO ())
 -> Tracer IO (TraceChainSyncServerEvent blk))
-> (TraceChainSyncServerEvent blk -> IO ())
-> Tracer IO (TraceChainSyncServerEvent blk)
forall a b. (a -> b) -> a -> b
$
          Trace IO (TraceChainSyncServerEvent blk)
-> TraceChainSyncServerEvent blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceChainSyncServerEvent blk)
chainSyncServerBlockTr
      , blockFetchDecisionTracer :: Tracer
  IO
  [TraceLabelPeer
     (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
Consensus.blockFetchDecisionTracer = ([TraceLabelPeer
    (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
 -> IO ())
-> Tracer
     IO
     [TraceLabelPeer
        (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (([TraceLabelPeer
     (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
  -> IO ())
 -> Tracer
      IO
      [TraceLabelPeer
         (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])])
-> ([TraceLabelPeer
       (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
    -> IO ())
-> Tracer
     IO
     [TraceLabelPeer
        (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  [TraceLabelPeer
     (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
-> [TraceLabelPeer
      (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  [TraceLabelPeer
     (ConnectionId RemoteAddress) (FetchDecision [Point (Header blk)])]
blockFetchDecisionTr
      , blockFetchClientTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
Consensus.blockFetchClientTracer = (TraceLabelPeer
   (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))))
-> (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
-> TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
blockFetchClientTr
          (TraceLabelPeer
   (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
 -> IO ())
-> (TraceLabelPeer
      (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
    -> IO ())
-> TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
-> IO ()
forall a. Semigroup a => a -> a -> a
<> Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
-> TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress) (TraceFetchClientState (Header blk)))
blockFetchClientMetricsTr
      , blockFetchServerTracer :: Tracer IO (TraceBlockFetchServerEvent blk)
Consensus.blockFetchServerTracer = (TraceBlockFetchServerEvent blk -> IO ())
-> Tracer IO (TraceBlockFetchServerEvent blk)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceBlockFetchServerEvent blk -> IO ())
 -> Tracer IO (TraceBlockFetchServerEvent blk))
-> (TraceBlockFetchServerEvent blk -> IO ())
-> Tracer IO (TraceBlockFetchServerEvent blk)
forall a b. (a -> b) -> a -> b
$
          Trace IO (TraceBlockFetchServerEvent blk)
-> TraceBlockFetchServerEvent blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceBlockFetchServerEvent blk)
blockFetchServerTr
      , forgeStateInfoTracer :: Tracer IO (TraceLabelCreds (ForgeStateInfo blk))
Consensus.forgeStateInfoTracer = (TraceLabelCreds (ForgeStateInfo blk) -> IO ())
-> Tracer IO (TraceLabelCreds (ForgeStateInfo blk))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelCreds (ForgeStateInfo blk) -> IO ())
 -> Tracer IO (TraceLabelCreds (ForgeStateInfo blk)))
-> (TraceLabelCreds (ForgeStateInfo blk) -> IO ())
-> Tracer IO (TraceLabelCreds (ForgeStateInfo blk))
forall a b. (a -> b) -> a -> b
$
          Trace IO (TraceLabelCreds (ForgeStateInfo blk))
-> TraceLabelCreds (ForgeStateInfo blk) -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith (Proxy blk
-> Trace IO (TraceLabelCreds KESInfo)
-> Trace IO (TraceLabelCreds (ForgeStateInfo blk))
forall (m :: * -> *) blk.
(GetKESInfo blk, MonadIO m) =>
Proxy blk
-> Trace m (TraceLabelCreds KESInfo)
-> Trace m (TraceLabelCreds (ForgeStateInfo blk))
traceAsKESInfo (Proxy blk
forall k (t :: k). Proxy t
Proxy @blk) Trace IO (TraceLabelCreds KESInfo)
forgeKESInfoTr)
      , txInboundTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
Consensus.txInboundTracer = (TraceLabelPeer
   (ConnectionId RemoteAddress)
   (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId RemoteAddress)
    (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))))
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
-> TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
txInboundTr
      , txOutboundTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
Consensus.txOutboundTracer = (TraceLabelPeer
   (ConnectionId RemoteAddress)
   (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId RemoteAddress)
    (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))))
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
-> TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
txOutboundTr
      , localTxSubmissionServerTracer :: Tracer IO (TraceLocalTxSubmissionServerEvent blk)
Consensus.localTxSubmissionServerTracer = (TraceLocalTxSubmissionServerEvent blk -> IO ())
-> Tracer IO (TraceLocalTxSubmissionServerEvent blk)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLocalTxSubmissionServerEvent blk -> IO ())
 -> Tracer IO (TraceLocalTxSubmissionServerEvent blk))
-> (TraceLocalTxSubmissionServerEvent blk -> IO ())
-> Tracer IO (TraceLocalTxSubmissionServerEvent blk)
forall a b. (a -> b) -> a -> b
$
          Trace IO (TraceLocalTxSubmissionServerEvent blk)
-> TraceLocalTxSubmissionServerEvent blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceLocalTxSubmissionServerEvent blk)
localTxSubmissionServerTr
      , mempoolTracer :: Tracer IO (TraceEventMempool blk)
Consensus.mempoolTracer = (TraceEventMempool blk -> IO ())
-> Tracer IO (TraceEventMempool blk)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceEventMempool blk -> IO ())
 -> Tracer IO (TraceEventMempool blk))
-> (TraceEventMempool blk -> IO ())
-> Tracer IO (TraceEventMempool blk)
forall a b. (a -> b) -> a -> b
$
          Trace IO (TraceEventMempool blk) -> TraceEventMempool blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceEventMempool blk)
mempoolTr
      , forgeTracer :: Tracer IO (TraceLabelCreds (TraceForgeEvent blk))
Consensus.forgeTracer =
          (TraceLabelCreds (TraceForgeEvent blk) -> IO ())
-> Tracer IO (TraceLabelCreds (TraceForgeEvent blk))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (\(Consensus.TraceLabelCreds Text
_ TraceForgeEvent blk
x) -> Trace IO (TraceForgeEvent blk) -> TraceForgeEvent blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith ((TraceForgeEvent blk -> ForgeTracerType blk)
-> Trace IO (ForgeTracerType blk) -> Trace IO (TraceForgeEvent blk)
forall (f :: * -> *) a b. Contravariant f => (a -> b) -> f b -> f a
contramap TraceForgeEvent blk -> ForgeTracerType blk
forall a b. a -> Either a b
Left Trace IO (ForgeTracerType blk)
forgeTr) TraceForgeEvent blk
x)
          Tracer IO (TraceLabelCreds (TraceForgeEvent blk))
-> Tracer IO (TraceLabelCreds (TraceForgeEvent blk))
-> Tracer IO (TraceLabelCreds (TraceForgeEvent blk))
forall a. Semigroup a => a -> a -> a
<> -- TODO: add the forge-thread-stats as a datapoint
          (TraceLabelCreds (TraceForgeEvent blk) -> IO ())
-> Tracer IO (TraceLabelCreds (TraceForgeEvent blk))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer (\(Consensus.TraceLabelCreds Text
_ TraceForgeEvent blk
x) -> Trace IO (TraceForgeEvent blk) -> TraceForgeEvent blk -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith ((TraceForgeEvent blk -> ForgeTracerType blk)
-> Trace IO (ForgeTracerType blk) -> Trace IO (TraceForgeEvent blk)
forall (f :: * -> *) a b. Contravariant f => (a -> b) -> f b -> f a
contramap TraceForgeEvent blk -> ForgeTracerType blk
forall a b. a -> Either a b
Left Trace IO (ForgeTracerType blk)
forgeThreadStatsTr) TraceForgeEvent blk
x)
      , blockchainTimeTracer :: Tracer IO (TraceBlockchainTimeEvent UTCTime)
Consensus.blockchainTimeTracer = (TraceBlockchainTimeEvent UTCTime -> IO ())
-> Tracer IO (TraceBlockchainTimeEvent UTCTime)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceBlockchainTimeEvent UTCTime -> IO ())
 -> Tracer IO (TraceBlockchainTimeEvent UTCTime))
-> (TraceBlockchainTimeEvent UTCTime -> IO ())
-> Tracer IO (TraceBlockchainTimeEvent UTCTime)
forall a b. (a -> b) -> a -> b
$
          Trace IO (TraceBlockchainTimeEvent UTCTime)
-> TraceBlockchainTimeEvent UTCTime -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceBlockchainTimeEvent UTCTime)
blockchainTimeTr
      , keepAliveClientTracer :: Tracer IO (TraceKeepAliveClient (ConnectionId RemoteAddress))
Consensus.keepAliveClientTracer = (TraceKeepAliveClient (ConnectionId RemoteAddress) -> IO ())
-> Tracer IO (TraceKeepAliveClient (ConnectionId RemoteAddress))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceKeepAliveClient (ConnectionId RemoteAddress) -> IO ())
 -> Tracer IO (TraceKeepAliveClient (ConnectionId RemoteAddress)))
-> (TraceKeepAliveClient (ConnectionId RemoteAddress) -> IO ())
-> Tracer IO (TraceKeepAliveClient (ConnectionId RemoteAddress))
forall a b. (a -> b) -> a -> b
$
          Trace IO (TraceKeepAliveClient (ConnectionId RemoteAddress))
-> TraceKeepAliveClient (ConnectionId RemoteAddress) -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceKeepAliveClient (ConnectionId RemoteAddress))
keepAliveClientTr
      }

mkNodeToClientTracers :: forall blk.
     Consensus.RunNode blk
  => Trace IO FormattedMessage
  -> Trace IO FormattedMessage
  -> Maybe (Trace IO FormattedMessage)
  -> Trace IO DataPoint
  -> TraceConfig
  -> IO (NodeToClient.Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure)
mkNodeToClientTracers :: Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> IO
     (Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure)
mkNodeToClientTracers Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
_trDataPoint TraceConfig
trConfig = do
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk))))
chainSyncTr <-
      Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId LocalAddress)
           (TraceSendRecv
              (ChainSync (Serialised blk) (Point blk) (Tip blk)))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
        Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
        [Text
"ChainSync", Text
"Local"]
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
-> [Text]
forall peer blk.
TraceLabelPeer
  peer
  (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
-> [Text]
namesForTChainSync
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
-> SeverityS
forall peer blk.
TraceLabelPeer
  peer
  (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
-> SeverityS
severityTChainSync
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk))))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId LocalAddress)
         (TraceSendRecv
            (ChainSync (Serialised blk) (Point blk) (Tip blk))))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk))))
forall peer x blk.
Documented
  (TraceLabelPeer
     peer (TraceSendRecv (ChainSync x (Point blk) (Tip blk))))
docTChainSyncNodeToClient [Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk))))
chainSyncTr]
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
txMonitorTr <-
      Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId LocalAddress)
           (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
        Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
        [Text
"TxSubmission", Text
"MonitorClient"]
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
-> [Text]
forall peer blk.
TraceLabelPeer
  peer
  (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
-> [Text]
namesForTTxMonitor
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
-> SeverityS
forall peer blk.
TraceLabelPeer
  peer
  (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
-> SeverityS
severityTTxMonitor
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId LocalAddress)
         (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
forall localPeer blk.
Documented
  (TraceLabelPeer
     localPeer
     (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
docTTxMonitor [Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
txMonitorTr]
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
txSubmissionTr <-
      Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId LocalAddress)
           (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
        Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
        [Text
"TxSubmission", Text
"Local"]
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
-> [Text]
forall peer blk.
TraceLabelPeer
  peer
  (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
-> [Text]
namesForTTxSubmission
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
-> SeverityS
forall peer blk.
TraceLabelPeer
  peer
  (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
-> SeverityS
severityTTxSubmission
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId LocalAddress)
         (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
forall localPeer blk.
Documented
  (TraceLabelPeer
     localPeer
     (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
docTTxSubmission [Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
txSubmissionTr]
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))
stateQueryTr <-
      Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId LocalAddress)
           (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
        Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
        [Text
"StateQueryServer"]
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))
-> [Text]
forall peer blk (query :: * -> *).
TraceLabelPeer
  peer (TraceSendRecv (LocalStateQuery blk (Point blk) query))
-> [Text]
namesForTStateQuery
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))
-> SeverityS
forall peer blk (query :: * -> *).
TraceLabelPeer
  peer (TraceSendRecv (LocalStateQuery blk (Point blk) query))
-> SeverityS
severityTStateQuery
        TraceLabelPeer
  (ConnectionId LocalAddress)
  (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId LocalAddress)
         (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))
forall peer blk pt.
Documented
  (TraceLabelPeer
     peer (TraceSendRecv (LocalStateQuery blk pt (Query blk))))
docTStateQuery [Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))
stateQueryTr]
    Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure
-> IO
     (Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure
 -> IO
      (Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure))
-> Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure
-> IO
     (Tracers IO (ConnectionId LocalAddress) blk DeserialiseFailure)
forall a b. (a -> b) -> a -> b
$ Tracers :: forall peer blk e (f :: * -> *).
f (TraceLabelPeer
     peer
     (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk))))
-> f (TraceLabelPeer
        peer
        (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
-> f (TraceLabelPeer
        peer (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))
-> f (TraceLabelPeer
        peer
        (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
-> Tracers' peer blk e f
NtC.Tracers
      { tChainSyncTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk))))
NtC.tChainSyncTracer = (TraceLabelPeer
   (ConnectionId LocalAddress)
   (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk))))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId LocalAddress)
    (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId LocalAddress)
         (TraceSendRecv
            (ChainSync (Serialised blk) (Point blk) (Tip blk)))))
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk))))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk))))
-> TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk)))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (ChainSync (Serialised blk) (Point blk) (Tip blk))))
chainSyncTr
      , tTxMonitorTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
NtC.tTxMonitorTracer = (TraceLabelPeer
   (ConnectionId LocalAddress)
   (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId LocalAddress)
    (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId LocalAddress)
         (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))))
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
-> TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxMonitor (GenTxId blk) (GenTx blk) SlotNo)))
txMonitorTr
      , tTxSubmissionTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
NtC.tTxSubmissionTracer = (TraceLabelPeer
   (ConnectionId LocalAddress)
   (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId LocalAddress)
    (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId LocalAddress)
         (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))))
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
-> TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk)))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalTxSubmission (GenTx blk) (ApplyTxErr blk))))
txSubmissionTr
      , tStateQueryTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))
NtC.tStateQueryTracer = (TraceLabelPeer
   (ConnectionId LocalAddress)
   (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId LocalAddress)
    (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId LocalAddress)
         (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))))
-> (TraceLabelPeer
      (ConnectionId LocalAddress)
      (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId LocalAddress)
        (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))
-> TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk)))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId LocalAddress)
     (TraceSendRecv (LocalStateQuery blk (Point blk) (Query blk))))
stateQueryTr
      }

mkNodeToNodeTracers :: forall blk.
  ( Consensus.RunNode blk
  , TraceConstraints blk)
  => Trace IO FormattedMessage
  -> Trace IO FormattedMessage
  -> Maybe (Trace IO FormattedMessage)
  -> Trace IO DataPoint
  -> TraceConfig
  -> IO (NodeToNode.Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure)
mkNodeToNodeTracers :: Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> IO
     (Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure)
mkNodeToNodeTracers Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
_trDataPoint TraceConfig
trConfig = do
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))
chainSyncTracer <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress)
           (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"ChainSync", Text
"Remote"]
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
-> [Text]
forall peer blk.
TraceLabelPeer
  peer (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
-> [Text]
namesForTChainSyncNode
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
-> SeverityS
forall peer blk.
TraceLabelPeer
  peer (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
-> SeverityS
severityTChainSyncNode
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))
forall peer x blk.
Documented
  (TraceLabelPeer
     peer (TraceSendRecv (ChainSync x (Point blk) (Tip blk))))
docTChainSyncNodeToNode [Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))
chainSyncTracer]
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv
        (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))
chainSyncSerialisedTr <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv
         (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv
         (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv
         (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress)
           (TraceSendRecv
              (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"ChainSync", Text
"Remote", Text
"Serialised"]
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv
     (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
-> [Text]
forall peer blk.
TraceLabelPeer
  peer
  (TraceSendRecv
     (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
-> [Text]
namesForTChainSyncSerialised
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv
     (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
-> SeverityS
forall peer blk.
TraceLabelPeer
  peer
  (TraceSendRecv
     (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
-> SeverityS
severityTChainSyncSerialised
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv
     (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv
           (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceSendRecv
            (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv
        (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))
forall peer x blk.
Documented
  (TraceLabelPeer
     peer (TraceSendRecv (ChainSync x (Point blk) (Tip blk))))
docTChainSyncNodeToNodeSerisalised [Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv
        (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))
chainSyncSerialisedTr]
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch blk (Point blk))))
blockFetchTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (BlockFetch blk (Point blk)))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (BlockFetch blk (Point blk)))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (BlockFetch blk (Point blk)))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress)
           (TraceSendRecv (BlockFetch blk (Point blk)))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"BlockFetch", Text
"Remote"]
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (BlockFetch blk (Point blk)))
-> [Text]
forall peer blk.
TraceLabelPeer peer (TraceSendRecv (BlockFetch blk (Point blk)))
-> [Text]
namesForTBlockFetch
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (BlockFetch blk (Point blk)))
-> SeverityS
forall peer blk.
TraceLabelPeer peer (TraceSendRecv (BlockFetch blk (Point blk)))
-> SeverityS
severityTBlockFetch
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (BlockFetch blk (Point blk)))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (BlockFetch blk (Point blk))))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceSendRecv (BlockFetch blk (Point blk))))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch blk (Point blk))))
forall peer x blk.
Documented
  (TraceLabelPeer peer (TraceSendRecv (BlockFetch x (Point blk))))
docTBlockFetch [Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch blk (Point blk))))
blockFetchTr]
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))
blockFetchSerialisedTr <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress)
           (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"BlockFetch", Text
"Remote", Text
"Serialised"]
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
-> [Text]
forall peer blk.
TraceLabelPeer
  peer (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
-> [Text]
namesForTBlockFetchSerialised
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
-> SeverityS
forall peer blk.
TraceLabelPeer
  peer (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
-> SeverityS
severityTBlockFetchSerialised
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))
forall peer x blk.
Documented
  (TraceLabelPeer peer (TraceSendRecv (BlockFetch x (Point blk))))
docTBlockFetch [Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))
blockFetchSerialisedTr]
    Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
txSubmission2Tracer  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
    -> [Text])
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
    -> SeverityS)
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
    -> Privacy)
-> IO
     (Trace
        IO
        (TraceLabelPeer
           (ConnectionId RemoteAddress)
           (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"TxSubmission", Text
"Remote"]
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
-> [Text]
forall blk peer.
TraceLabelPeer
  peer (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
-> [Text]
namesForTxSubmission2Node
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
-> SeverityS
forall blk peer.
TraceLabelPeer
  peer (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
-> SeverityS
severityTxSubmission2Node
                TraceLabelPeer
  (ConnectionId RemoteAddress)
  (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
-> [Trace
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
forall peer blk.
Documented
  (TraceLabelPeer
     peer (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
docTTxSubmission2Node [Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
txSubmission2Tracer]
    Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure
-> IO
     (Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure
 -> IO
      (Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure))
-> Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure
-> IO
     (Tracers IO (ConnectionId RemoteAddress) blk DeserialiseFailure)
forall a b. (a -> b) -> a -> b
$ Tracers :: forall peer blk e (f :: * -> *).
f (TraceLabelPeer
     peer
     (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))
-> f (TraceLabelPeer
        peer
        (TraceSendRecv
           (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))
-> f (TraceLabelPeer
        peer (TraceSendRecv (BlockFetch blk (Point blk))))
-> f (TraceLabelPeer
        peer (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))
-> f (TraceLabelPeer
        peer (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
-> Tracers' peer blk e f
NtN.Tracers
      { tChainSyncTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))
NtN.tChainSyncTracer = (TraceLabelPeer
   (ConnectionId RemoteAddress)
   (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId RemoteAddress)
    (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))))
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))
-> TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk)))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (ChainSync (Header blk) (Point blk) (Tip blk))))
chainSyncTracer
      , tChainSyncSerialisedTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv
        (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))
NtN.tChainSyncSerialisedTracer = (TraceLabelPeer
   (ConnectionId RemoteAddress)
   (TraceSendRecv
      (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv
           (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId RemoteAddress)
    (TraceSendRecv
       (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceSendRecv
            (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))))
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv
         (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv
           (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv
        (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))
-> TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv
        (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk)))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv
        (ChainSync (SerialisedHeader blk) (Point blk) (Tip blk))))
chainSyncSerialisedTr
      , tBlockFetchTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch blk (Point blk))))
NtN.tBlockFetchTracer = (TraceLabelPeer
   (ConnectionId RemoteAddress)
   (TraceSendRecv (BlockFetch blk (Point blk)))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (BlockFetch blk (Point blk))))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId RemoteAddress)
    (TraceSendRecv (BlockFetch blk (Point blk)))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceSendRecv (BlockFetch blk (Point blk)))))
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (BlockFetch blk (Point blk)))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (BlockFetch blk (Point blk))))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch blk (Point blk))))
-> TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch blk (Point blk)))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch blk (Point blk))))
blockFetchTr
      , tBlockFetchSerialisedTracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))
NtN.tBlockFetchSerialisedTracer = (TraceLabelPeer
   (ConnectionId RemoteAddress)
   (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId RemoteAddress)
    (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))))
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))
-> TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch (Serialised blk) (Point blk)))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (BlockFetch (Serialised blk) (Point blk))))
blockFetchSerialisedTr
      , tTxSubmission2Tracer :: Tracer
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
NtN.tTxSubmission2Tracer = (TraceLabelPeer
   (ConnectionId RemoteAddress)
   (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
 -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLabelPeer
    (ConnectionId RemoteAddress)
    (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
  -> IO ())
 -> Tracer
      IO
      (TraceLabelPeer
         (ConnectionId RemoteAddress)
         (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))))
-> (TraceLabelPeer
      (ConnectionId RemoteAddress)
      (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
    -> IO ())
-> Tracer
     IO
     (TraceLabelPeer
        (ConnectionId RemoteAddress)
        (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
forall a b. (a -> b) -> a -> b
$
          Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
-> TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk)))
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (TraceLabelPeer
     (ConnectionId RemoteAddress)
     (TraceSendRecv (TxSubmission2 (GenTxId blk) (GenTx blk))))
txSubmission2Tracer
      }

mkDiffusionTracers
  :: Trace IO FormattedMessage
  -> Trace IO FormattedMessage
  -> Maybe (Trace IO FormattedMessage)
  -> Trace IO DataPoint
  -> TraceConfig
  -> IO (Diffusion.Tracers RemoteAddress NodeToNodeVersion
        LocalAddress NodeToClientVersion IO)
mkDiffusionTracers :: Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> IO
     (Tracers
        RemoteAddress
        NodeToNodeVersion
        LocalAddress
        NodeToClientVersion
        IO)
mkDiffusionTracers  Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
_trDataPoint TraceConfig
trConfig = do
    Trace IO (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace)
dtMuxTr   <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace -> [Text])
-> (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace
    -> SeverityS)
-> (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace -> Privacy)
-> IO
     (Trace IO (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"Mux", Text
"Remote"]
                WithMuxBearer (ConnectionId RemoteAddress) MuxTrace -> [Text]
forall peer. WithMuxBearer peer MuxTrace -> [Text]
namesForMux
                WithMuxBearer (ConnectionId RemoteAddress) MuxTrace -> SeverityS
forall peer. WithMuxBearer peer MuxTrace -> SeverityS
severityMux
                WithMuxBearer (ConnectionId RemoteAddress) MuxTrace -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace)
-> [Trace IO (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace)
docMuxRemote [Trace IO (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace)
dtMuxTr]
    Trace IO (WithMuxBearer (ConnectionId LocalAddress) MuxTrace)
dtLocalMuxTr   <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (WithMuxBearer (ConnectionId LocalAddress) MuxTrace -> [Text])
-> (WithMuxBearer (ConnectionId LocalAddress) MuxTrace
    -> SeverityS)
-> (WithMuxBearer (ConnectionId LocalAddress) MuxTrace -> Privacy)
-> IO
     (Trace IO (WithMuxBearer (ConnectionId LocalAddress) MuxTrace))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"Mux", Text
"Local"]
                WithMuxBearer (ConnectionId LocalAddress) MuxTrace -> [Text]
forall peer. WithMuxBearer peer MuxTrace -> [Text]
namesForMux
                WithMuxBearer (ConnectionId LocalAddress) MuxTrace -> SeverityS
forall peer. WithMuxBearer peer MuxTrace -> SeverityS
severityMux
                WithMuxBearer (ConnectionId LocalAddress) MuxTrace -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (WithMuxBearer (ConnectionId LocalAddress) MuxTrace)
-> [Trace IO (WithMuxBearer (ConnectionId LocalAddress) MuxTrace)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (WithMuxBearer (ConnectionId LocalAddress) MuxTrace)
docMuxLocal [Trace IO (WithMuxBearer (ConnectionId LocalAddress) MuxTrace)
dtLocalMuxTr]
    Trace IO (HandshakeTr RemoteAddress NodeToNodeVersion)
dtHandshakeTr   <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (HandshakeTr RemoteAddress NodeToNodeVersion -> [Text])
-> (HandshakeTr RemoteAddress NodeToNodeVersion -> SeverityS)
-> (HandshakeTr RemoteAddress NodeToNodeVersion -> Privacy)
-> IO (Trace IO (HandshakeTr RemoteAddress NodeToNodeVersion))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"Handshake", Text
"Remote"]
                HandshakeTr RemoteAddress NodeToNodeVersion -> [Text]
forall adr ver. HandshakeTr adr ver -> [Text]
namesForHandshake
                HandshakeTr RemoteAddress NodeToNodeVersion -> SeverityS
forall adr ver. HandshakeTr adr ver -> SeverityS
severityHandshake
                HandshakeTr RemoteAddress NodeToNodeVersion -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (HandshakeTr RemoteAddress NodeToNodeVersion)
-> [Trace IO (HandshakeTr RemoteAddress NodeToNodeVersion)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (HandshakeTr RemoteAddress NodeToNodeVersion)
forall ver. Documented (HandshakeTr RemoteAddress ver)
docHandshake [Trace IO (HandshakeTr RemoteAddress NodeToNodeVersion)
dtHandshakeTr]
    Trace IO (HandshakeTr LocalAddress NodeToClientVersion)
dtLocalHandshakeTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (HandshakeTr LocalAddress NodeToClientVersion -> [Text])
-> (HandshakeTr LocalAddress NodeToClientVersion -> SeverityS)
-> (HandshakeTr LocalAddress NodeToClientVersion -> Privacy)
-> IO (Trace IO (HandshakeTr LocalAddress NodeToClientVersion))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"Handshake", Text
"Local"]
                HandshakeTr LocalAddress NodeToClientVersion -> [Text]
forall adr ver. HandshakeTr adr ver -> [Text]
namesForLocalHandshake
                HandshakeTr LocalAddress NodeToClientVersion -> SeverityS
forall adr ver. HandshakeTr adr ver -> SeverityS
severityLocalHandshake
                HandshakeTr LocalAddress NodeToClientVersion -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (HandshakeTr LocalAddress NodeToClientVersion)
-> [Trace IO (HandshakeTr LocalAddress NodeToClientVersion)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (HandshakeTr LocalAddress NodeToClientVersion)
forall ver. Documented (HandshakeTr LocalAddress ver)
docLocalHandshake [Trace IO (HandshakeTr LocalAddress NodeToClientVersion)
dtLocalHandshakeTr]
    Trace IO (InitializationTracer RemoteAddress LocalAddress)
dtDiffusionInitializationTr   <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (InitializationTracer RemoteAddress LocalAddress -> [Text])
-> (InitializationTracer RemoteAddress LocalAddress -> SeverityS)
-> (InitializationTracer RemoteAddress LocalAddress -> Privacy)
-> IO (Trace IO (InitializationTracer RemoteAddress LocalAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Startup", Text
"DiffusionInit"]
                InitializationTracer RemoteAddress LocalAddress -> [Text]
forall rard ladr. InitializationTracer rard ladr -> [Text]
namesForDiffusionInit
                InitializationTracer RemoteAddress LocalAddress -> SeverityS
forall rard ladr. InitializationTracer rard ladr -> SeverityS
severityDiffusionInit
                InitializationTracer RemoteAddress LocalAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (InitializationTracer RemoteAddress LocalAddress)
-> [Trace IO (InitializationTracer RemoteAddress LocalAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (InitializationTracer RemoteAddress LocalAddress)
docDiffusionInit [Trace IO (InitializationTracer RemoteAddress LocalAddress)
dtDiffusionInitializationTr]
    Trace IO TraceLedgerPeers
dtLedgerPeersTr   <- Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLedgerPeers -> [Text])
-> (TraceLedgerPeers -> SeverityS)
-> (TraceLedgerPeers -> Privacy)
-> IO (Trace IO TraceLedgerPeers)
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"Peers", Text
"Ledger"]
                TraceLedgerPeers -> [Text]
namesForLedgerPeers
                TraceLedgerPeers -> SeverityS
severityLedgerPeers
                TraceLedgerPeers -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented TraceLedgerPeers
-> [Trace IO TraceLedgerPeers]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented TraceLedgerPeers
docLedgerPeers [Trace IO TraceLedgerPeers
dtLedgerPeersTr]
    Tracers
  RemoteAddress NodeToNodeVersion LocalAddress NodeToClientVersion IO
-> IO
     (Tracers
        RemoteAddress
        NodeToNodeVersion
        LocalAddress
        NodeToClientVersion
        IO)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Tracers
   RemoteAddress NodeToNodeVersion LocalAddress NodeToClientVersion IO
 -> IO
      (Tracers
         RemoteAddress
         NodeToNodeVersion
         LocalAddress
         NodeToClientVersion
         IO))
-> Tracers
     RemoteAddress NodeToNodeVersion LocalAddress NodeToClientVersion IO
-> IO
     (Tracers
        RemoteAddress
        NodeToNodeVersion
        LocalAddress
        NodeToClientVersion
        IO)
forall a b. (a -> b) -> a -> b
$ Tracers :: forall ntnAddr ntnVersion ntcAddr ntcVersion (m :: * -> *).
Tracer m (WithMuxBearer (ConnectionId ntnAddr) MuxTrace)
-> Tracer m (HandshakeTr ntnAddr ntnVersion)
-> Tracer m (WithMuxBearer (ConnectionId ntcAddr) MuxTrace)
-> Tracer m (HandshakeTr ntcAddr ntcVersion)
-> Tracer m (InitializationTracer ntnAddr ntcAddr)
-> Tracer m TraceLedgerPeers
-> Tracers ntnAddr ntnVersion ntcAddr ntcVersion m
Diffusion.Tracers
       { dtMuxTracer :: Tracer IO (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace)
Diffusion.dtMuxTracer                     = (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace -> IO ())
-> Tracer IO (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((WithMuxBearer (ConnectionId RemoteAddress) MuxTrace -> IO ())
 -> Tracer IO (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace))
-> (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace -> IO ())
-> Tracer IO (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace)
forall a b. (a -> b) -> a -> b
$
           Trace IO (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace)
-> WithMuxBearer (ConnectionId RemoteAddress) MuxTrace -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (WithMuxBearer (ConnectionId RemoteAddress) MuxTrace)
dtMuxTr
       , dtHandshakeTracer :: Tracer IO (HandshakeTr RemoteAddress NodeToNodeVersion)
Diffusion.dtHandshakeTracer               = (HandshakeTr RemoteAddress NodeToNodeVersion -> IO ())
-> Tracer IO (HandshakeTr RemoteAddress NodeToNodeVersion)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((HandshakeTr RemoteAddress NodeToNodeVersion -> IO ())
 -> Tracer IO (HandshakeTr RemoteAddress NodeToNodeVersion))
-> (HandshakeTr RemoteAddress NodeToNodeVersion -> IO ())
-> Tracer IO (HandshakeTr RemoteAddress NodeToNodeVersion)
forall a b. (a -> b) -> a -> b
$
           Trace IO (HandshakeTr RemoteAddress NodeToNodeVersion)
-> HandshakeTr RemoteAddress NodeToNodeVersion -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (HandshakeTr RemoteAddress NodeToNodeVersion)
dtHandshakeTr
       , dtLocalMuxTracer :: Tracer IO (WithMuxBearer (ConnectionId LocalAddress) MuxTrace)
Diffusion.dtLocalMuxTracer                = (WithMuxBearer (ConnectionId LocalAddress) MuxTrace -> IO ())
-> Tracer IO (WithMuxBearer (ConnectionId LocalAddress) MuxTrace)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((WithMuxBearer (ConnectionId LocalAddress) MuxTrace -> IO ())
 -> Tracer IO (WithMuxBearer (ConnectionId LocalAddress) MuxTrace))
-> (WithMuxBearer (ConnectionId LocalAddress) MuxTrace -> IO ())
-> Tracer IO (WithMuxBearer (ConnectionId LocalAddress) MuxTrace)
forall a b. (a -> b) -> a -> b
$
           Trace IO (WithMuxBearer (ConnectionId LocalAddress) MuxTrace)
-> WithMuxBearer (ConnectionId LocalAddress) MuxTrace -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (WithMuxBearer (ConnectionId LocalAddress) MuxTrace)
dtLocalMuxTr
       , dtLocalHandshakeTracer :: Tracer IO (HandshakeTr LocalAddress NodeToClientVersion)
Diffusion.dtLocalHandshakeTracer          = (HandshakeTr LocalAddress NodeToClientVersion -> IO ())
-> Tracer IO (HandshakeTr LocalAddress NodeToClientVersion)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((HandshakeTr LocalAddress NodeToClientVersion -> IO ())
 -> Tracer IO (HandshakeTr LocalAddress NodeToClientVersion))
-> (HandshakeTr LocalAddress NodeToClientVersion -> IO ())
-> Tracer IO (HandshakeTr LocalAddress NodeToClientVersion)
forall a b. (a -> b) -> a -> b
$
           Trace IO (HandshakeTr LocalAddress NodeToClientVersion)
-> HandshakeTr LocalAddress NodeToClientVersion -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (HandshakeTr LocalAddress NodeToClientVersion)
dtLocalHandshakeTr
       , dtDiffusionInitializationTracer :: Tracer IO (InitializationTracer RemoteAddress LocalAddress)
Diffusion.dtDiffusionInitializationTracer = (InitializationTracer RemoteAddress LocalAddress -> IO ())
-> Tracer IO (InitializationTracer RemoteAddress LocalAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((InitializationTracer RemoteAddress LocalAddress -> IO ())
 -> Tracer IO (InitializationTracer RemoteAddress LocalAddress))
-> (InitializationTracer RemoteAddress LocalAddress -> IO ())
-> Tracer IO (InitializationTracer RemoteAddress LocalAddress)
forall a b. (a -> b) -> a -> b
$
           Trace IO (InitializationTracer RemoteAddress LocalAddress)
-> InitializationTracer RemoteAddress LocalAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (InitializationTracer RemoteAddress LocalAddress)
dtDiffusionInitializationTr
       , dtLedgerPeersTracer :: Tracer IO TraceLedgerPeers
Diffusion.dtLedgerPeersTracer             = (TraceLedgerPeers -> IO ()) -> Tracer IO TraceLedgerPeers
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLedgerPeers -> IO ()) -> Tracer IO TraceLedgerPeers)
-> (TraceLedgerPeers -> IO ()) -> Tracer IO TraceLedgerPeers
forall a b. (a -> b) -> a -> b
$
           Trace IO TraceLedgerPeers -> TraceLedgerPeers -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO TraceLedgerPeers
dtLedgerPeersTr
       }

mkDiffusionTracersExtra  :: forall p2p.
     Trace IO FormattedMessage
  -> Trace IO FormattedMessage
  -> Maybe (Trace IO FormattedMessage)
  -> Trace IO DataPoint
  -> TraceConfig
  -> NetworkP2PMode p2p
  -> IO (Diffusion.ExtraTracers p2p)
mkDiffusionTracersExtra :: Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> Trace IO DataPoint
-> TraceConfig
-> NetworkP2PMode p2p
-> IO (ExtraTracers p2p)
mkDiffusionTracersExtra Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
_trDataPoint TraceConfig
trConfig NetworkP2PMode p2p
EnabledP2PMode = do
    Trace IO (TraceLocalRootPeers RemoteAddress IOException)
localRootPeersTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TraceLocalRootPeers RemoteAddress IOException -> [Text])
-> (TraceLocalRootPeers RemoteAddress IOException -> SeverityS)
-> (TraceLocalRootPeers RemoteAddress IOException -> Privacy)
-> IO (Trace IO (TraceLocalRootPeers RemoteAddress IOException))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"Peers", Text
"LocalRoot"]
      TraceLocalRootPeers RemoteAddress IOException -> [Text]
forall ntnAddr resolverError.
TraceLocalRootPeers ntnAddr resolverError -> [Text]
namesForLocalRootPeers
      TraceLocalRootPeers RemoteAddress IOException -> SeverityS
forall ntnAddr resolverError.
TraceLocalRootPeers ntnAddr resolverError -> SeverityS
severityLocalRootPeers
      TraceLocalRootPeers RemoteAddress IOException -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (TraceLocalRootPeers RemoteAddress IOException)
-> [Trace IO (TraceLocalRootPeers RemoteAddress IOException)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TraceLocalRootPeers RemoteAddress IOException)
forall ntnAddr resolverError.
Documented (TraceLocalRootPeers ntnAddr resolverError)
docLocalRootPeers [Trace IO (TraceLocalRootPeers RemoteAddress IOException)
localRootPeersTr]
    Trace IO TracePublicRootPeers
publicRootPeersTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TracePublicRootPeers -> [Text])
-> (TracePublicRootPeers -> SeverityS)
-> (TracePublicRootPeers -> Privacy)
-> IO (Trace IO TracePublicRootPeers)
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"Peers", Text
"PublicRoot"]
      TracePublicRootPeers -> [Text]
namesForPublicRootPeers
      TracePublicRootPeers -> SeverityS
severityPublicRootPeers
      TracePublicRootPeers -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented TracePublicRootPeers
-> [Trace IO TracePublicRootPeers]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented TracePublicRootPeers
docPublicRootPeers [Trace IO TracePublicRootPeers
publicRootPeersTr]
    Trace IO (TracePeerSelection RemoteAddress)
peerSelectionTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (TracePeerSelection RemoteAddress -> [Text])
-> (TracePeerSelection RemoteAddress -> SeverityS)
-> (TracePeerSelection RemoteAddress -> Privacy)
-> IO (Trace IO (TracePeerSelection RemoteAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"PeerSelection", Text
"Selection"]
      TracePeerSelection RemoteAddress -> [Text]
forall peeraddr. TracePeerSelection peeraddr -> [Text]
namesForPeerSelection
      TracePeerSelection RemoteAddress -> SeverityS
forall peeraddr. TracePeerSelection peeraddr -> SeverityS
severityPeerSelection
      TracePeerSelection RemoteAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (TracePeerSelection RemoteAddress)
-> [Trace IO (TracePeerSelection RemoteAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (TracePeerSelection RemoteAddress)
docPeerSelection [Trace IO (TracePeerSelection RemoteAddress)
peerSelectionTr]
    Trace IO (DebugPeerSelection RemoteAddress)
debugPeerSelectionTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (DebugPeerSelection RemoteAddress -> [Text])
-> (DebugPeerSelection RemoteAddress -> SeverityS)
-> (DebugPeerSelection RemoteAddress -> Privacy)
-> IO (Trace IO (DebugPeerSelection RemoteAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"PeerSelection", Text
"Initiator"]
      DebugPeerSelection RemoteAddress -> [Text]
namesForDebugPeerSelection
      DebugPeerSelection RemoteAddress -> SeverityS
severityDebugPeerSelection
      DebugPeerSelection RemoteAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (DebugPeerSelection RemoteAddress)
-> [Trace IO (DebugPeerSelection RemoteAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (DebugPeerSelection RemoteAddress)
docDebugPeerSelection [Trace IO (DebugPeerSelection RemoteAddress)
debugPeerSelectionTr]
    Trace IO (DebugPeerSelection RemoteAddress)
debugPeerSelectionResponderTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (DebugPeerSelection RemoteAddress -> [Text])
-> (DebugPeerSelection RemoteAddress -> SeverityS)
-> (DebugPeerSelection RemoteAddress -> Privacy)
-> IO (Trace IO (DebugPeerSelection RemoteAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"PeerSelection", Text
"Responder"]
      DebugPeerSelection RemoteAddress -> [Text]
namesForDebugPeerSelection
      DebugPeerSelection RemoteAddress -> SeverityS
severityDebugPeerSelection
      DebugPeerSelection RemoteAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (DebugPeerSelection RemoteAddress)
-> [Trace IO (DebugPeerSelection RemoteAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (DebugPeerSelection RemoteAddress)
docDebugPeerSelection [Trace IO (DebugPeerSelection RemoteAddress)
debugPeerSelectionResponderTr]
    Trace IO PeerSelectionCounters
peerSelectionCountersTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (PeerSelectionCounters -> [Text])
-> (PeerSelectionCounters -> SeverityS)
-> (PeerSelectionCounters -> Privacy)
-> IO (Trace IO PeerSelectionCounters)
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"PeerSelection", Text
"Counters"]
      PeerSelectionCounters -> [Text]
namesForPeerSelectionCounters
      PeerSelectionCounters -> SeverityS
severityPeerSelectionCounters
      PeerSelectionCounters -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented PeerSelectionCounters
-> [Trace IO PeerSelectionCounters]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented PeerSelectionCounters
docPeerSelectionCounters [Trace IO PeerSelectionCounters
peerSelectionCountersTr]
    Trace IO (PeerSelectionActionsTrace RemoteAddress)
peerSelectionActionsTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (PeerSelectionActionsTrace RemoteAddress -> [Text])
-> (PeerSelectionActionsTrace RemoteAddress -> SeverityS)
-> (PeerSelectionActionsTrace RemoteAddress -> Privacy)
-> IO (Trace IO (PeerSelectionActionsTrace RemoteAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"PeerSelection", Text
"Actions"]
      PeerSelectionActionsTrace RemoteAddress -> [Text]
forall ntnAddr. PeerSelectionActionsTrace ntnAddr -> [Text]
namesForPeerSelectionActions
      PeerSelectionActionsTrace RemoteAddress -> SeverityS
forall ntnAddr. PeerSelectionActionsTrace ntnAddr -> SeverityS
severityPeerSelectionActions
      PeerSelectionActionsTrace RemoteAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (PeerSelectionActionsTrace RemoteAddress)
-> [Trace IO (PeerSelectionActionsTrace RemoteAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (PeerSelectionActionsTrace RemoteAddress)
forall ntnAddr. Documented (PeerSelectionActionsTrace ntnAddr)
docPeerSelectionActions [Trace IO (PeerSelectionActionsTrace RemoteAddress)
peerSelectionActionsTr]
    Trace
  IO
  (ConnectionManagerTrace
     RemoteAddress
     (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData))
connectionManagerTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (ConnectionManagerTrace
      RemoteAddress
      (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)
    -> [Text])
-> (ConnectionManagerTrace
      RemoteAddress
      (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)
    -> SeverityS)
-> (ConnectionManagerTrace
      RemoteAddress
      (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)
    -> Privacy)
-> IO
     (Trace
        IO
        (ConnectionManagerTrace
           RemoteAddress
           (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"ConnectionManager", Text
"Remote"]
      ConnectionManagerTrace
  RemoteAddress
  (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)
-> [Text]
forall ntnAddr cht. ConnectionManagerTrace ntnAddr cht -> [Text]
namesForConnectionManager
      ConnectionManagerTrace
  RemoteAddress
  (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)
-> SeverityS
forall addr versionNumber agreedOptions.
ConnectionManagerTrace
  addr (ConnectionHandlerTrace versionNumber agreedOptions)
-> SeverityS
severityConnectionManager
      ConnectionManagerTrace
  RemoteAddress
  (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (ConnectionManagerTrace
        RemoteAddress
        (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData))
-> [Trace
      IO
      (ConnectionManagerTrace
         RemoteAddress
         (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (ConnectionManagerTrace
     RemoteAddress
     (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData))
forall ntnAddr ntnVersion ntnVersionData.
Documented
  (ConnectionManagerTrace
     ntnAddr (ConnectionHandlerTrace ntnVersion ntnVersionData))
docConnectionManager [Trace
  IO
  (ConnectionManagerTrace
     RemoteAddress
     (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData))
connectionManagerTr]
    Trace IO (AbstractTransitionTrace RemoteAddress)
connectionManagerTransitionsTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (AbstractTransitionTrace RemoteAddress -> [Text])
-> (AbstractTransitionTrace RemoteAddress -> SeverityS)
-> (AbstractTransitionTrace RemoteAddress -> Privacy)
-> IO (Trace IO (AbstractTransitionTrace RemoteAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"ConnectionManager", Text
"Remote", Text
"Transition"]
      (AbstractTransitionTrace RemoteAddress -> [Text]
forall peerAddr. AbstractTransitionTrace peerAddr -> [Text]
namesForConnectionManagerTransition @RemoteAddress)
      AbstractTransitionTrace RemoteAddress -> SeverityS
forall peerAddr. AbstractTransitionTrace peerAddr -> SeverityS
severityConnectionManagerTransition
      AbstractTransitionTrace RemoteAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (AbstractTransitionTrace RemoteAddress)
-> [Trace IO (AbstractTransitionTrace RemoteAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (AbstractTransitionTrace RemoteAddress)
forall peerAddr. Documented (AbstractTransitionTrace peerAddr)
docConnectionManagerTransition [Trace IO (AbstractTransitionTrace RemoteAddress)
connectionManagerTransitionsTr]
    Trace IO (ServerTrace RemoteAddress)
serverTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (ServerTrace RemoteAddress -> [Text])
-> (ServerTrace RemoteAddress -> SeverityS)
-> (ServerTrace RemoteAddress -> Privacy)
-> IO (Trace IO (ServerTrace RemoteAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"Server", Text
"Remote"]
      ServerTrace RemoteAddress -> [Text]
forall ntnAddr. ServerTrace ntnAddr -> [Text]
namesForServer
      ServerTrace RemoteAddress -> SeverityS
forall ntnAddr. ServerTrace ntnAddr -> SeverityS
severityServer
      ServerTrace RemoteAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (ServerTrace RemoteAddress)
-> [Trace IO (ServerTrace RemoteAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (ServerTrace RemoteAddress)
forall ntnAddr. Documented (ServerTrace ntnAddr)
docServer [Trace IO (ServerTrace RemoteAddress)
serverTr]
    Trace IO (InboundGovernorTrace RemoteAddress)
inboundGovernorTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (InboundGovernorTrace RemoteAddress -> [Text])
-> (InboundGovernorTrace RemoteAddress -> SeverityS)
-> (InboundGovernorTrace RemoteAddress -> Privacy)
-> IO (Trace IO (InboundGovernorTrace RemoteAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"InboundGovernor", Text
"Remote"]
      InboundGovernorTrace RemoteAddress -> [Text]
forall peerAddr. InboundGovernorTrace peerAddr -> [Text]
namesForInboundGovernor
      InboundGovernorTrace RemoteAddress -> SeverityS
forall peerAddr. InboundGovernorTrace peerAddr -> SeverityS
severityInboundGovernor
      InboundGovernorTrace RemoteAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (InboundGovernorTrace RemoteAddress)
-> [Trace IO (InboundGovernorTrace RemoteAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (InboundGovernorTrace RemoteAddress)
docInboundGovernorRemote [Trace IO (InboundGovernorTrace RemoteAddress)
inboundGovernorTr]
    Trace IO (RemoteTransitionTrace RemoteAddress)
inboundGovernorTransitionsTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (RemoteTransitionTrace RemoteAddress -> [Text])
-> (RemoteTransitionTrace RemoteAddress -> SeverityS)
-> (RemoteTransitionTrace RemoteAddress -> Privacy)
-> IO (Trace IO (RemoteTransitionTrace RemoteAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"InboundGovernor", Text
"Remote", Text
"Transition"]
      RemoteTransitionTrace RemoteAddress -> [Text]
forall peerAddr. RemoteTransitionTrace peerAddr -> [Text]
namesForInboundGovernorTransition
      RemoteTransitionTrace RemoteAddress -> SeverityS
forall peerAddr. RemoteTransitionTrace peerAddr -> SeverityS
severityInboundGovernorTransition
      RemoteTransitionTrace RemoteAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (RemoteTransitionTrace RemoteAddress)
-> [Trace IO (RemoteTransitionTrace RemoteAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (RemoteTransitionTrace RemoteAddress)
forall peerAddr. Documented (RemoteTransitionTrace peerAddr)
docInboundGovernorTransition [Trace IO (RemoteTransitionTrace RemoteAddress)
inboundGovernorTransitionsTr]
    Trace
  IO
  (ConnectionManagerTrace
     LocalAddress
     (ConnectionHandlerTrace
        NodeToClientVersion NodeToClientVersionData))
localConnectionManagerTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (ConnectionManagerTrace
      LocalAddress
      (ConnectionHandlerTrace
         NodeToClientVersion NodeToClientVersionData)
    -> [Text])
-> (ConnectionManagerTrace
      LocalAddress
      (ConnectionHandlerTrace
         NodeToClientVersion NodeToClientVersionData)
    -> SeverityS)
-> (ConnectionManagerTrace
      LocalAddress
      (ConnectionHandlerTrace
         NodeToClientVersion NodeToClientVersionData)
    -> Privacy)
-> IO
     (Trace
        IO
        (ConnectionManagerTrace
           LocalAddress
           (ConnectionHandlerTrace
              NodeToClientVersion NodeToClientVersionData)))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"ConnectionManager", Text
"Local"]
      ConnectionManagerTrace
  LocalAddress
  (ConnectionHandlerTrace
     NodeToClientVersion NodeToClientVersionData)
-> [Text]
forall ntnAddr cht. ConnectionManagerTrace ntnAddr cht -> [Text]
namesForConnectionManager
      ConnectionManagerTrace
  LocalAddress
  (ConnectionHandlerTrace
     NodeToClientVersion NodeToClientVersionData)
-> SeverityS
forall addr versionNumber agreedOptions.
ConnectionManagerTrace
  addr (ConnectionHandlerTrace versionNumber agreedOptions)
-> SeverityS
severityConnectionManager
      ConnectionManagerTrace
  LocalAddress
  (ConnectionHandlerTrace
     NodeToClientVersion NodeToClientVersionData)
-> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented
     (ConnectionManagerTrace
        LocalAddress
        (ConnectionHandlerTrace
           NodeToClientVersion NodeToClientVersionData))
-> [Trace
      IO
      (ConnectionManagerTrace
         LocalAddress
         (ConnectionHandlerTrace
            NodeToClientVersion NodeToClientVersionData))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented
  (ConnectionManagerTrace
     LocalAddress
     (ConnectionHandlerTrace
        NodeToClientVersion NodeToClientVersionData))
forall ntnAddr ntnVersion ntnVersionData.
Documented
  (ConnectionManagerTrace
     ntnAddr (ConnectionHandlerTrace ntnVersion ntnVersionData))
docConnectionManager [Trace
  IO
  (ConnectionManagerTrace
     LocalAddress
     (ConnectionHandlerTrace
        NodeToClientVersion NodeToClientVersionData))
localConnectionManagerTr]
    Trace IO (ServerTrace LocalAddress)
localServerTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (ServerTrace LocalAddress -> [Text])
-> (ServerTrace LocalAddress -> SeverityS)
-> (ServerTrace LocalAddress -> Privacy)
-> IO (Trace IO (ServerTrace LocalAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"Server", Text
"Local"]
      ServerTrace LocalAddress -> [Text]
forall ntnAddr. ServerTrace ntnAddr -> [Text]
namesForServer
      ServerTrace LocalAddress -> SeverityS
forall ntnAddr. ServerTrace ntnAddr -> SeverityS
severityServer
      ServerTrace LocalAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (ServerTrace LocalAddress)
-> [Trace IO (ServerTrace LocalAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (ServerTrace LocalAddress)
forall ntnAddr. Documented (ServerTrace ntnAddr)
docServer [Trace IO (ServerTrace LocalAddress)
localServerTr]
    Trace IO (InboundGovernorTrace LocalAddress)
localInboundGovernorTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (InboundGovernorTrace LocalAddress -> [Text])
-> (InboundGovernorTrace LocalAddress -> SeverityS)
-> (InboundGovernorTrace LocalAddress -> Privacy)
-> IO (Trace IO (InboundGovernorTrace LocalAddress))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
      Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
      [Text
"Net", Text
"InboundGovernor", Text
"Local"]
      InboundGovernorTrace LocalAddress -> [Text]
forall peerAddr. InboundGovernorTrace peerAddr -> [Text]
namesForInboundGovernor
      InboundGovernorTrace LocalAddress -> SeverityS
forall peerAddr. InboundGovernorTrace peerAddr -> SeverityS
severityInboundGovernor
      InboundGovernorTrace LocalAddress -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (InboundGovernorTrace LocalAddress)
-> [Trace IO (InboundGovernorTrace LocalAddress)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (InboundGovernorTrace LocalAddress)
docInboundGovernorLocal [Trace IO (InboundGovernorTrace LocalAddress)
localInboundGovernorTr]
    ExtraTracers 'P2P -> IO (ExtraTracers 'P2P)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ExtraTracers 'P2P -> IO (ExtraTracers 'P2P))
-> ExtraTracers 'P2P -> IO (ExtraTracers 'P2P)
forall a b. (a -> b) -> a -> b
$ TracersExtra
  RemoteAddress
  NodeToNodeVersion
  NodeToNodeVersionData
  LocalAddress
  NodeToClientVersion
  NodeToClientVersionData
  IOException
  IO
-> ExtraTracers 'P2P
Diffusion.P2PTracers TracersExtra :: forall ntnAddr ntnVersion ntnVersionData ntcAddr ntcVersion
       ntcVersionData resolverError (m :: * -> *).
Tracer m (TraceLocalRootPeers ntnAddr resolverError)
-> Tracer m TracePublicRootPeers
-> Tracer m (TracePeerSelection ntnAddr)
-> Tracer m (DebugPeerSelection ntnAddr)
-> Tracer m (DebugPeerSelection ntnAddr)
-> Tracer m PeerSelectionCounters
-> Tracer m (PeerSelectionActionsTrace ntnAddr)
-> Tracer
     m
     (ConnectionManagerTrace
        ntnAddr (ConnectionHandlerTrace ntnVersion ntnVersionData))
-> Tracer m (AbstractTransitionTrace ntnAddr)
-> Tracer m (ServerTrace ntnAddr)
-> Tracer m (InboundGovernorTrace ntnAddr)
-> Tracer m (RemoteTransitionTrace ntnAddr)
-> Tracer
     m
     (ConnectionManagerTrace
        ntcAddr (ConnectionHandlerTrace ntcVersion ntcVersionData))
-> Tracer m (ServerTrace ntcAddr)
-> Tracer m (InboundGovernorTrace ntcAddr)
-> TracersExtra
     ntnAddr
     ntnVersion
     ntnVersionData
     ntcAddr
     ntcVersion
     ntcVersionData
     resolverError
     m
P2P.TracersExtra
             { dtTraceLocalRootPeersTracer :: Tracer IO (TraceLocalRootPeers RemoteAddress IOException)
P2P.dtTraceLocalRootPeersTracer = (TraceLocalRootPeers RemoteAddress IOException -> IO ())
-> Tracer IO (TraceLocalRootPeers RemoteAddress IOException)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TraceLocalRootPeers RemoteAddress IOException -> IO ())
 -> Tracer IO (TraceLocalRootPeers RemoteAddress IOException))
-> (TraceLocalRootPeers RemoteAddress IOException -> IO ())
-> Tracer IO (TraceLocalRootPeers RemoteAddress IOException)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (TraceLocalRootPeers RemoteAddress IOException)
-> TraceLocalRootPeers RemoteAddress IOException -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TraceLocalRootPeers RemoteAddress IOException)
localRootPeersTr
             , dtTracePublicRootPeersTracer :: Tracer IO TracePublicRootPeers
P2P.dtTracePublicRootPeersTracer = (TracePublicRootPeers -> IO ()) -> Tracer IO TracePublicRootPeers
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TracePublicRootPeers -> IO ()) -> Tracer IO TracePublicRootPeers)
-> (TracePublicRootPeers -> IO ())
-> Tracer IO TracePublicRootPeers
forall a b. (a -> b) -> a -> b
$
                 Trace IO TracePublicRootPeers -> TracePublicRootPeers -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO TracePublicRootPeers
publicRootPeersTr
             , dtTracePeerSelectionTracer :: Tracer IO (TracePeerSelection RemoteAddress)
P2P.dtTracePeerSelectionTracer = (TracePeerSelection RemoteAddress -> IO ())
-> Tracer IO (TracePeerSelection RemoteAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((TracePeerSelection RemoteAddress -> IO ())
 -> Tracer IO (TracePeerSelection RemoteAddress))
-> (TracePeerSelection RemoteAddress -> IO ())
-> Tracer IO (TracePeerSelection RemoteAddress)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (TracePeerSelection RemoteAddress)
-> TracePeerSelection RemoteAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (TracePeerSelection RemoteAddress)
peerSelectionTr
             , dtDebugPeerSelectionInitiatorTracer :: Tracer IO (DebugPeerSelection RemoteAddress)
P2P.dtDebugPeerSelectionInitiatorTracer = (DebugPeerSelection RemoteAddress -> IO ())
-> Tracer IO (DebugPeerSelection RemoteAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((DebugPeerSelection RemoteAddress -> IO ())
 -> Tracer IO (DebugPeerSelection RemoteAddress))
-> (DebugPeerSelection RemoteAddress -> IO ())
-> Tracer IO (DebugPeerSelection RemoteAddress)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (DebugPeerSelection RemoteAddress)
-> DebugPeerSelection RemoteAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (DebugPeerSelection RemoteAddress)
debugPeerSelectionTr
             , dtDebugPeerSelectionInitiatorResponderTracer :: Tracer IO (DebugPeerSelection RemoteAddress)
P2P.dtDebugPeerSelectionInitiatorResponderTracer = (DebugPeerSelection RemoteAddress -> IO ())
-> Tracer IO (DebugPeerSelection RemoteAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((DebugPeerSelection RemoteAddress -> IO ())
 -> Tracer IO (DebugPeerSelection RemoteAddress))
-> (DebugPeerSelection RemoteAddress -> IO ())
-> Tracer IO (DebugPeerSelection RemoteAddress)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (DebugPeerSelection RemoteAddress)
-> DebugPeerSelection RemoteAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (DebugPeerSelection RemoteAddress)
debugPeerSelectionResponderTr
             , dtTracePeerSelectionCounters :: Tracer IO PeerSelectionCounters
P2P.dtTracePeerSelectionCounters = (PeerSelectionCounters -> IO ()) -> Tracer IO PeerSelectionCounters
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((PeerSelectionCounters -> IO ())
 -> Tracer IO PeerSelectionCounters)
-> (PeerSelectionCounters -> IO ())
-> Tracer IO PeerSelectionCounters
forall a b. (a -> b) -> a -> b
$
                 Trace IO PeerSelectionCounters -> PeerSelectionCounters -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO PeerSelectionCounters
peerSelectionCountersTr
             , dtPeerSelectionActionsTracer :: Tracer IO (PeerSelectionActionsTrace RemoteAddress)
P2P.dtPeerSelectionActionsTracer = (PeerSelectionActionsTrace RemoteAddress -> IO ())
-> Tracer IO (PeerSelectionActionsTrace RemoteAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((PeerSelectionActionsTrace RemoteAddress -> IO ())
 -> Tracer IO (PeerSelectionActionsTrace RemoteAddress))
-> (PeerSelectionActionsTrace RemoteAddress -> IO ())
-> Tracer IO (PeerSelectionActionsTrace RemoteAddress)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (PeerSelectionActionsTrace RemoteAddress)
-> PeerSelectionActionsTrace RemoteAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (PeerSelectionActionsTrace RemoteAddress)
peerSelectionActionsTr
             , dtConnectionManagerTracer :: Tracer
  IO
  (ConnectionManagerTrace
     RemoteAddress
     (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData))
P2P.dtConnectionManagerTracer = (ConnectionManagerTrace
   RemoteAddress
   (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)
 -> IO ())
-> Tracer
     IO
     (ConnectionManagerTrace
        RemoteAddress
        (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((ConnectionManagerTrace
    RemoteAddress
    (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)
  -> IO ())
 -> Tracer
      IO
      (ConnectionManagerTrace
         RemoteAddress
         (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)))
-> (ConnectionManagerTrace
      RemoteAddress
      (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)
    -> IO ())
-> Tracer
     IO
     (ConnectionManagerTrace
        RemoteAddress
        (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData))
forall a b. (a -> b) -> a -> b
$
                 Trace
  IO
  (ConnectionManagerTrace
     RemoteAddress
     (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData))
-> ConnectionManagerTrace
     RemoteAddress
     (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData)
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (ConnectionManagerTrace
     RemoteAddress
     (ConnectionHandlerTrace NodeToNodeVersion NodeToNodeVersionData))
connectionManagerTr
             , dtConnectionManagerTransitionTracer :: Tracer IO (AbstractTransitionTrace RemoteAddress)
P2P.dtConnectionManagerTransitionTracer = (AbstractTransitionTrace RemoteAddress -> IO ())
-> Tracer IO (AbstractTransitionTrace RemoteAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((AbstractTransitionTrace RemoteAddress -> IO ())
 -> Tracer IO (AbstractTransitionTrace RemoteAddress))
-> (AbstractTransitionTrace RemoteAddress -> IO ())
-> Tracer IO (AbstractTransitionTrace RemoteAddress)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (AbstractTransitionTrace RemoteAddress)
-> AbstractTransitionTrace RemoteAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (AbstractTransitionTrace RemoteAddress)
connectionManagerTransitionsTr
             , dtServerTracer :: Tracer IO (ServerTrace RemoteAddress)
P2P.dtServerTracer = (ServerTrace RemoteAddress -> IO ())
-> Tracer IO (ServerTrace RemoteAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((ServerTrace RemoteAddress -> IO ())
 -> Tracer IO (ServerTrace RemoteAddress))
-> (ServerTrace RemoteAddress -> IO ())
-> Tracer IO (ServerTrace RemoteAddress)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (ServerTrace RemoteAddress)
-> ServerTrace RemoteAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (ServerTrace RemoteAddress)
serverTr
             , dtInboundGovernorTracer :: Tracer IO (InboundGovernorTrace RemoteAddress)
P2P.dtInboundGovernorTracer = (InboundGovernorTrace RemoteAddress -> IO ())
-> Tracer IO (InboundGovernorTrace RemoteAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((InboundGovernorTrace RemoteAddress -> IO ())
 -> Tracer IO (InboundGovernorTrace RemoteAddress))
-> (InboundGovernorTrace RemoteAddress -> IO ())
-> Tracer IO (InboundGovernorTrace RemoteAddress)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (InboundGovernorTrace RemoteAddress)
-> InboundGovernorTrace RemoteAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (InboundGovernorTrace RemoteAddress)
inboundGovernorTr
             , dtInboundGovernorTransitionTracer :: Tracer IO (RemoteTransitionTrace RemoteAddress)
P2P.dtInboundGovernorTransitionTracer = (RemoteTransitionTrace RemoteAddress -> IO ())
-> Tracer IO (RemoteTransitionTrace RemoteAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((RemoteTransitionTrace RemoteAddress -> IO ())
 -> Tracer IO (RemoteTransitionTrace RemoteAddress))
-> (RemoteTransitionTrace RemoteAddress -> IO ())
-> Tracer IO (RemoteTransitionTrace RemoteAddress)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (RemoteTransitionTrace RemoteAddress)
-> RemoteTransitionTrace RemoteAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (RemoteTransitionTrace RemoteAddress)
inboundGovernorTransitionsTr
             , dtLocalConnectionManagerTracer :: Tracer
  IO
  (ConnectionManagerTrace
     LocalAddress
     (ConnectionHandlerTrace
        NodeToClientVersion NodeToClientVersionData))
P2P.dtLocalConnectionManagerTracer =  (ConnectionManagerTrace
   LocalAddress
   (ConnectionHandlerTrace
      NodeToClientVersion NodeToClientVersionData)
 -> IO ())
-> Tracer
     IO
     (ConnectionManagerTrace
        LocalAddress
        (ConnectionHandlerTrace
           NodeToClientVersion NodeToClientVersionData))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((ConnectionManagerTrace
    LocalAddress
    (ConnectionHandlerTrace
       NodeToClientVersion NodeToClientVersionData)
  -> IO ())
 -> Tracer
      IO
      (ConnectionManagerTrace
         LocalAddress
         (ConnectionHandlerTrace
            NodeToClientVersion NodeToClientVersionData)))
-> (ConnectionManagerTrace
      LocalAddress
      (ConnectionHandlerTrace
         NodeToClientVersion NodeToClientVersionData)
    -> IO ())
-> Tracer
     IO
     (ConnectionManagerTrace
        LocalAddress
        (ConnectionHandlerTrace
           NodeToClientVersion NodeToClientVersionData))
forall a b. (a -> b) -> a -> b
$
                 Trace
  IO
  (ConnectionManagerTrace
     LocalAddress
     (ConnectionHandlerTrace
        NodeToClientVersion NodeToClientVersionData))
-> ConnectionManagerTrace
     LocalAddress
     (ConnectionHandlerTrace
        NodeToClientVersion NodeToClientVersionData)
-> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace
  IO
  (ConnectionManagerTrace
     LocalAddress
     (ConnectionHandlerTrace
        NodeToClientVersion NodeToClientVersionData))
localConnectionManagerTr
             , dtLocalServerTracer :: Tracer IO (ServerTrace LocalAddress)
P2P.dtLocalServerTracer = (ServerTrace LocalAddress -> IO ())
-> Tracer IO (ServerTrace LocalAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((ServerTrace LocalAddress -> IO ())
 -> Tracer IO (ServerTrace LocalAddress))
-> (ServerTrace LocalAddress -> IO ())
-> Tracer IO (ServerTrace LocalAddress)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (ServerTrace LocalAddress)
-> ServerTrace LocalAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (ServerTrace LocalAddress)
localServerTr
             , dtLocalInboundGovernorTracer :: Tracer IO (InboundGovernorTrace LocalAddress)
P2P.dtLocalInboundGovernorTracer = (InboundGovernorTrace LocalAddress -> IO ())
-> Tracer IO (InboundGovernorTrace LocalAddress)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((InboundGovernorTrace LocalAddress -> IO ())
 -> Tracer IO (InboundGovernorTrace LocalAddress))
-> (InboundGovernorTrace LocalAddress -> IO ())
-> Tracer IO (InboundGovernorTrace LocalAddress)
forall a b. (a -> b) -> a -> b
$
                 Trace IO (InboundGovernorTrace LocalAddress)
-> InboundGovernorTrace LocalAddress -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (InboundGovernorTrace LocalAddress)
localInboundGovernorTr
             }

mkDiffusionTracersExtra Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG Trace IO DataPoint
_trDataPoint TraceConfig
trConfig NetworkP2PMode p2p
DisabledP2PMode = do
    Trace IO (WithIPList (SubscriptionTrace RemoteAddress))
dtIpSubscriptionTr   <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (WithIPList (SubscriptionTrace RemoteAddress) -> [Text])
-> (WithIPList (SubscriptionTrace RemoteAddress) -> SeverityS)
-> (WithIPList (SubscriptionTrace RemoteAddress) -> Privacy)
-> IO (Trace IO (WithIPList (SubscriptionTrace RemoteAddress)))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"Subscription", Text
"IP"]
                WithIPList (SubscriptionTrace RemoteAddress) -> [Text]
namesForIPSubscription
                WithIPList (SubscriptionTrace RemoteAddress) -> SeverityS
severityIPSubscription
                WithIPList (SubscriptionTrace RemoteAddress) -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (WithIPList (SubscriptionTrace RemoteAddress))
-> [Trace IO (WithIPList (SubscriptionTrace RemoteAddress))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (WithIPList (SubscriptionTrace RemoteAddress))
docIPSubscription [Trace IO (WithIPList (SubscriptionTrace RemoteAddress))
dtIpSubscriptionTr]
    Trace IO (WithDomainName (SubscriptionTrace RemoteAddress))
dtDnsSubscriptionTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (WithDomainName (SubscriptionTrace RemoteAddress) -> [Text])
-> (WithDomainName (SubscriptionTrace RemoteAddress) -> SeverityS)
-> (WithDomainName (SubscriptionTrace RemoteAddress) -> Privacy)
-> IO (Trace IO (WithDomainName (SubscriptionTrace RemoteAddress)))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"Subscription", Text
"DNS"]
                WithDomainName (SubscriptionTrace RemoteAddress) -> [Text]
namesForDNSSubscription
                WithDomainName (SubscriptionTrace RemoteAddress) -> SeverityS
severityDNSSubscription
                WithDomainName (SubscriptionTrace RemoteAddress) -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (WithDomainName (SubscriptionTrace RemoteAddress))
-> [Trace IO (WithDomainName (SubscriptionTrace RemoteAddress))]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (WithDomainName (SubscriptionTrace RemoteAddress))
docDNSSubscription [Trace IO (WithDomainName (SubscriptionTrace RemoteAddress))
dtDnsSubscriptionTr]
    Trace IO (WithDomainName DnsTrace)
dtDnsResolverTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (WithDomainName DnsTrace -> [Text])
-> (WithDomainName DnsTrace -> SeverityS)
-> (WithDomainName DnsTrace -> Privacy)
-> IO (Trace IO (WithDomainName DnsTrace))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"DNSResolver"]
                WithDomainName DnsTrace -> [Text]
namesForDNSResolver
                WithDomainName DnsTrace -> SeverityS
severityDNSResolver
                WithDomainName DnsTrace -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (WithDomainName DnsTrace)
-> [Trace IO (WithDomainName DnsTrace)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (WithDomainName DnsTrace)
docDNSResolver [Trace IO (WithDomainName DnsTrace)
dtDnsResolverTr]
    Trace IO (WithAddr RemoteAddress ErrorPolicyTrace)
dtErrorPolicyTr  <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (WithAddr RemoteAddress ErrorPolicyTrace -> [Text])
-> (WithAddr RemoteAddress ErrorPolicyTrace -> SeverityS)
-> (WithAddr RemoteAddress ErrorPolicyTrace -> Privacy)
-> IO (Trace IO (WithAddr RemoteAddress ErrorPolicyTrace))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"ErrorPolicy", Text
"Remote"]
                WithAddr RemoteAddress ErrorPolicyTrace -> [Text]
namesForErrorPolicy
                WithAddr RemoteAddress ErrorPolicyTrace -> SeverityS
severityErrorPolicy
                WithAddr RemoteAddress ErrorPolicyTrace -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (WithAddr RemoteAddress ErrorPolicyTrace)
-> [Trace IO (WithAddr RemoteAddress ErrorPolicyTrace)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (WithAddr RemoteAddress ErrorPolicyTrace)
docErrorPolicy [Trace IO (WithAddr RemoteAddress ErrorPolicyTrace)
dtErrorPolicyTr]
    Trace IO (WithAddr LocalAddress ErrorPolicyTrace)
dtLocalErrorPolicyTr <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (WithAddr LocalAddress ErrorPolicyTrace -> [Text])
-> (WithAddr LocalAddress ErrorPolicyTrace -> SeverityS)
-> (WithAddr LocalAddress ErrorPolicyTrace -> Privacy)
-> IO (Trace IO (WithAddr LocalAddress ErrorPolicyTrace))
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"ErrorPolicy", Text
"Local"]
                WithAddr LocalAddress ErrorPolicyTrace -> [Text]
namesForLocalErrorPolicy
                WithAddr LocalAddress ErrorPolicyTrace -> SeverityS
severityLocalErrorPolicy
                WithAddr LocalAddress ErrorPolicyTrace -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented (WithAddr LocalAddress ErrorPolicyTrace)
-> [Trace IO (WithAddr LocalAddress ErrorPolicyTrace)]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented (WithAddr LocalAddress ErrorPolicyTrace)
docLocalErrorPolicy [Trace IO (WithAddr LocalAddress ErrorPolicyTrace)
dtLocalErrorPolicyTr]
    Trace IO AcceptConnectionsPolicyTrace
dtAcceptPolicyTr    <-  Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (AcceptConnectionsPolicyTrace -> [Text])
-> (AcceptConnectionsPolicyTrace -> SeverityS)
-> (AcceptConnectionsPolicyTrace -> Privacy)
-> IO (Trace IO AcceptConnectionsPolicyTrace)
forall evt.
LogFormatting evt =>
Trace IO FormattedMessage
-> Trace IO FormattedMessage
-> Maybe (Trace IO FormattedMessage)
-> [Text]
-> (evt -> [Text])
-> (evt -> SeverityS)
-> (evt -> Privacy)
-> IO (Trace IO evt)
mkCardanoTracer
                Trace IO FormattedMessage
trBase Trace IO FormattedMessage
trForward Maybe (Trace IO FormattedMessage)
mbTrEKG
                [Text
"Net", Text
"AcceptPolicy"]
                AcceptConnectionsPolicyTrace -> [Text]
namesForAcceptPolicy
                AcceptConnectionsPolicyTrace -> SeverityS
severityAcceptPolicy
                AcceptConnectionsPolicyTrace -> Privacy
forall a. a -> Privacy
allPublic
    TraceConfig
-> Documented AcceptConnectionsPolicyTrace
-> [Trace IO AcceptConnectionsPolicyTrace]
-> IO ()
forall a. TraceConfig -> Documented a -> [Trace IO a] -> IO ()
configureTracers TraceConfig
trConfig Documented AcceptConnectionsPolicyTrace
docAcceptPolicy [Trace IO AcceptConnectionsPolicyTrace
dtAcceptPolicyTr]
    ExtraTracers 'NonP2P -> IO (ExtraTracers 'NonP2P)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ExtraTracers 'NonP2P -> IO (ExtraTracers 'NonP2P))
-> ExtraTracers 'NonP2P -> IO (ExtraTracers 'NonP2P)
forall a b. (a -> b) -> a -> b
$ TracersExtra -> ExtraTracers 'NonP2P
Diffusion.NonP2PTracers TracersExtra :: Tracer IO (WithIPList (SubscriptionTrace RemoteAddress))
-> Tracer IO (WithDomainName (SubscriptionTrace RemoteAddress))
-> Tracer IO (WithDomainName DnsTrace)
-> Tracer IO (WithAddr RemoteAddress ErrorPolicyTrace)
-> Tracer IO (WithAddr LocalAddress ErrorPolicyTrace)
-> Tracer IO AcceptConnectionsPolicyTrace
-> TracersExtra
NonP2P.TracersExtra
       { dtIpSubscriptionTracer :: Tracer IO (WithIPList (SubscriptionTrace RemoteAddress))
NonP2P.dtIpSubscriptionTracer = (WithIPList (SubscriptionTrace RemoteAddress) -> IO ())
-> Tracer IO (WithIPList (SubscriptionTrace RemoteAddress))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((WithIPList (SubscriptionTrace RemoteAddress) -> IO ())
 -> Tracer IO (WithIPList (SubscriptionTrace RemoteAddress)))
-> (WithIPList (SubscriptionTrace RemoteAddress) -> IO ())
-> Tracer IO (WithIPList (SubscriptionTrace RemoteAddress))
forall a b. (a -> b) -> a -> b
$
           Trace IO (WithIPList (SubscriptionTrace RemoteAddress))
-> WithIPList (SubscriptionTrace RemoteAddress) -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (WithIPList (SubscriptionTrace RemoteAddress))
dtIpSubscriptionTr
       , dtDnsSubscriptionTracer :: Tracer IO (WithDomainName (SubscriptionTrace RemoteAddress))
NonP2P.dtDnsSubscriptionTracer = (WithDomainName (SubscriptionTrace RemoteAddress) -> IO ())
-> Tracer IO (WithDomainName (SubscriptionTrace RemoteAddress))
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((WithDomainName (SubscriptionTrace RemoteAddress) -> IO ())
 -> Tracer IO (WithDomainName (SubscriptionTrace RemoteAddress)))
-> (WithDomainName (SubscriptionTrace RemoteAddress) -> IO ())
-> Tracer IO (WithDomainName (SubscriptionTrace RemoteAddress))
forall a b. (a -> b) -> a -> b
$
           Trace IO (WithDomainName (SubscriptionTrace RemoteAddress))
-> WithDomainName (SubscriptionTrace RemoteAddress) -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (WithDomainName (SubscriptionTrace RemoteAddress))
dtDnsSubscriptionTr
       , dtDnsResolverTracer :: Tracer IO (WithDomainName DnsTrace)
NonP2P.dtDnsResolverTracer = (WithDomainName DnsTrace -> IO ())
-> Tracer IO (WithDomainName DnsTrace)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((WithDomainName DnsTrace -> IO ())
 -> Tracer IO (WithDomainName DnsTrace))
-> (WithDomainName DnsTrace -> IO ())
-> Tracer IO (WithDomainName DnsTrace)
forall a b. (a -> b) -> a -> b
$
           Trace IO (WithDomainName DnsTrace)
-> WithDomainName DnsTrace -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (WithDomainName DnsTrace)
dtDnsResolverTr
       , dtErrorPolicyTracer :: Tracer IO (WithAddr RemoteAddress ErrorPolicyTrace)
NonP2P.dtErrorPolicyTracer = (WithAddr RemoteAddress ErrorPolicyTrace -> IO ())
-> Tracer IO (WithAddr RemoteAddress ErrorPolicyTrace)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((WithAddr RemoteAddress ErrorPolicyTrace -> IO ())
 -> Tracer IO (WithAddr RemoteAddress ErrorPolicyTrace))
-> (WithAddr RemoteAddress ErrorPolicyTrace -> IO ())
-> Tracer IO (WithAddr RemoteAddress ErrorPolicyTrace)
forall a b. (a -> b) -> a -> b
$
           Trace IO (WithAddr RemoteAddress ErrorPolicyTrace)
-> WithAddr RemoteAddress ErrorPolicyTrace -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (WithAddr RemoteAddress ErrorPolicyTrace)
dtErrorPolicyTr
       , dtLocalErrorPolicyTracer :: Tracer IO (WithAddr LocalAddress ErrorPolicyTrace)
NonP2P.dtLocalErrorPolicyTracer = (WithAddr LocalAddress ErrorPolicyTrace -> IO ())
-> Tracer IO (WithAddr LocalAddress ErrorPolicyTrace)
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((WithAddr LocalAddress ErrorPolicyTrace -> IO ())
 -> Tracer IO (WithAddr LocalAddress ErrorPolicyTrace))
-> (WithAddr LocalAddress ErrorPolicyTrace -> IO ())
-> Tracer IO (WithAddr LocalAddress ErrorPolicyTrace)
forall a b. (a -> b) -> a -> b
$
           Trace IO (WithAddr LocalAddress ErrorPolicyTrace)
-> WithAddr LocalAddress ErrorPolicyTrace -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO (WithAddr LocalAddress ErrorPolicyTrace)
dtLocalErrorPolicyTr
       , dtAcceptPolicyTracer :: Tracer IO AcceptConnectionsPolicyTrace
NonP2P.dtAcceptPolicyTracer = (AcceptConnectionsPolicyTrace -> IO ())
-> Tracer IO AcceptConnectionsPolicyTrace
forall (m :: * -> *) a. (a -> m ()) -> Tracer m a
Tracer ((AcceptConnectionsPolicyTrace -> IO ())
 -> Tracer IO AcceptConnectionsPolicyTrace)
-> (AcceptConnectionsPolicyTrace -> IO ())
-> Tracer IO AcceptConnectionsPolicyTrace
forall a b. (a -> b) -> a -> b
$
           Trace IO AcceptConnectionsPolicyTrace
-> AcceptConnectionsPolicyTrace -> IO ()
forall (m :: * -> *) a. Monad m => Trace m a -> a -> m ()
traceWith Trace IO AcceptConnectionsPolicyTrace
dtAcceptPolicyTr
       }