From c90ec4fd78677da1f8054c258b177760d6eb0afd Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Fri, 15 Jan 2021 00:56:22 +0300 Subject: [PATCH 1/7] Revert "Revert "CAD-2166 logging: move all metrics to 'cardano.node.metrics'"" This reverts commit d63bd90e0b6fe593e3f5c46b538a5bb05e772e54. --- cardano-node/src/Cardano/Tracing/Tracers.hs | 88 +++++++++++---------- 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/cardano-node/src/Cardano/Tracing/Tracers.hs b/cardano-node/src/Cardano/Tracing/Tracers.hs index 813c586c680..68f70a152ae 100644 --- a/cardano-node/src/Cardano/Tracing/Tracers.hs +++ b/cardano-node/src/Cardano/Tracing/Tracers.hs @@ -277,7 +277,8 @@ mkTracers tOpts@(TracingOn trSel) tr nodeKern = do pure Tracers { chainDBTracer = tracerOnOff' (traceChainDB trSel) $ - annotateSeverity . teeTraceChainTip tOpts elidedChainDB $ appendName "ChainDB" tr + annotateSeverity $ teeTraceChainTip tOpts elidedChainDB + (appendName "ChainDB" tr) (appendName "metrics" tr) , consensusTracers = consensusTracers , nodeToClientTracers = nodeToClientTracers' trSel verb tr , nodeToNodeTracers = nodeToNodeTracers' trSel verb tr @@ -353,12 +354,13 @@ teeTraceChainTip => TraceOptions -> MVar (Maybe (WithSeverity (ChainDB.TraceEvent blk)), Integer) -> Trace IO Text + -> Trace IO Text -> Tracer IO (WithSeverity (ChainDB.TraceEvent blk)) -teeTraceChainTip TracingOff _ _ = nullTracer -teeTraceChainTip (TracingOn trSel) elided tr = +teeTraceChainTip TracingOff _ _ _ = nullTracer +teeTraceChainTip (TracingOn trSel) elided trTrc trMet = Tracer $ \ev -> do - traceWith (teeTraceChainTip' tr) ev - traceWith (teeTraceChainTipElide (traceVerbosity trSel) elided tr) ev + traceWith (teeTraceChainTipElide (traceVerbosity trSel) elided trTrc) ev + traceWith (ignoringSeverity (traceChainMetrics trMet)) ev teeTraceChainTipElide :: ( ConvertRawHash blk @@ -372,36 +374,43 @@ teeTraceChainTipElide -> Trace IO Text -> Tracer IO (WithSeverity (ChainDB.TraceEvent blk)) teeTraceChainTipElide = elideToLogObject +{-# INLINE teeTraceChainTipElide #-} -traceChainInformation :: Trace IO Text -> ChainInformation -> IO () -traceChainInformation tr ChainInformation { slots, blocks, density, epoch, slotInEpoch } = do - -- TODO this is executed each time the chain changes. How cheap is it? - meta <- mkLOMeta Critical Confidential - let tr' = appendName "metrics" tr - traceD :: Text -> Double -> IO () - traceD msg d = traceNamedObject tr' (meta, LogValue msg (PureD d)) - traceI :: Integral a => Text -> a -> IO () - traceI msg i = traceNamedObject tr' (meta, LogValue msg (PureI (fromIntegral i))) - - traceD "density" (fromRational density) - traceI "slotNum" slots - traceI "blockNum" blocks - traceI "slotInEpoch" slotInEpoch - traceI "epoch" (unEpochNo epoch) - -teeTraceChainTip' - :: HasHeader (Header blk) - => Trace IO Text -> Tracer IO (WithSeverity (ChainDB.TraceEvent blk)) -teeTraceChainTip' tr = - Tracer $ \(WithSeverity _ ev') -> - case ev' of - (ChainDB.TraceAddBlockEvent ev) -> case ev of - ChainDB.SwitchedToAFork _warnings newTipInfo _ newChain -> - traceChainInformation tr (chainInformation newTipInfo newChain) - ChainDB.AddedToCurrentChain _warnings newTipInfo _ newChain -> - traceChainInformation tr (chainInformation newTipInfo newChain) - _ -> pure () - _ -> pure () +ignoringSeverity :: Tracer IO a -> Tracer IO (WithSeverity a) +ignoringSeverity tr = Tracer $ \(WithSeverity _ ev) -> traceWith tr ev +{-# INLINE ignoringSeverity #-} + +traceChainMetrics + :: forall blk. HasHeader (Header blk) + => Trace IO Text -> Tracer IO (ChainDB.TraceEvent blk) +traceChainMetrics tr = Tracer $ \ev -> + fromMaybe (pure ()) $ + doTrace <$> chainTipInformation ev + where + chainTipInformation :: ChainDB.TraceEvent blk -> Maybe ChainInformation + chainTipInformation = \case + ChainDB.TraceAddBlockEvent ev -> case ev of + ChainDB.SwitchedToAFork _warnings newTipInfo _ newChain -> + Just $ chainInformation newTipInfo newChain + ChainDB.AddedToCurrentChain _warnings newTipInfo _ newChain -> + Just $ chainInformation newTipInfo newChain + _ -> Nothing + _ -> Nothing + + doTrace :: ChainInformation -> IO () + doTrace ChainInformation { slots, blocks, density, epoch, slotInEpoch } = do + -- TODO this is executed each time the chain changes. How cheap is it? + meta <- mkLOMeta Critical Confidential + let traceD :: Text -> Double -> IO () + traceD msg d = traceNamedObject tr (meta, LogValue msg (PureD d)) + traceI :: Integral a => Text -> a -> IO () + traceI msg i = traceNamedObject tr (meta, LogValue msg (PureI (fromIntegral i))) + + traceD "density" (fromRational density) + traceI "slotNum" slots + traceI "blockNum" blocks + traceI "slotInEpoch" slotInEpoch + traceI "epoch" (unEpochNo epoch) -------------------------------------------------------------------------------- -- Consensus Tracers @@ -452,8 +461,7 @@ mkConsensusTracers trSel verb tr nodeKern fStats = do , Consensus.forgeTracer = tracerOnOff' (traceForge trSel) $ Tracer $ \tlcev@(Consensus.TraceLabelCreds _ ev) -> do traceWith (annotateSeverity - $ traceLeadershipChecks forgeTracers nodeKern verb - $ appendName "LeadershipCheck" tr) tlcev + $ traceLeadershipChecks forgeTracers nodeKern verb tr) tlcev traceWith (forgeTracer verb tr forgeTracers fStats) tlcev -- Don't track credentials in ForgeTime. traceWith (blockForgeOutcomeExtractor @@ -510,9 +518,9 @@ traceLeadershipChecks _ft nodeKern _tverb tr = Tracer $ fromSMaybe (pure ()) $ query <&> \(utxoSize, delegMapSize, _) -> do - traceCounter "utxoSize" tr utxoSize - traceCounter "delegMapSize" tr delegMapSize - traceNamedObject tr + traceCounter "utxoSize" tr utxoSize + traceCounter "delegMapSize" tr delegMapSize + traceNamedObject (appendName "LeadershipCheck" tr) ( meta , LogStructured $ Map.fromList $ [("kind", String "TraceStartLeadershipCheck") @@ -803,7 +811,7 @@ forgeStateInfoTracer -> Tracer IO (Consensus.TraceLabelCreds (ForgeStateInfo blk)) forgeStateInfoTracer p _ts tracer = Tracer $ \ev -> do let tr = appendName "Forge" tracer - traceWith (forgeStateInfoMetricsTraceTransformer p tr) ev + traceWith (forgeStateInfoMetricsTraceTransformer p tracer) ev traceWith (fsTracer tr) ev where fsTracer :: Trace IO Text -> Tracer IO (Consensus.TraceLabelCreds (ForgeStateInfo blk)) From 81d3d331af0564f43ebde96bf7dbb9c40c43ba85 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Fri, 15 Jan 2021 01:41:01 +0300 Subject: [PATCH 2/7] CAD-2477 log config: node-metrics is now node.metrics --- configuration/chairman/byron-shelley/configuration.yaml | 4 ++-- configuration/chairman/shelly-only/configuration.yaml | 4 ++-- configuration/defaults/byron-mainnet/configuration.yaml | 5 ++--- configuration/defaults/byron-staging/configuration.yaml | 2 -- configuration/defaults/byron-testnet/configuration.yaml | 2 -- .../defaults/mainnet-via-fetcher/configuration.yaml | 2 -- doc/getting-started/understanding-config-files.md | 5 +---- scripts/lite/configuration/shelley-1.yaml | 4 ++-- scripts/lite/configuration/shelley-2.yaml | 4 ++-- scripts/lite/configuration/shelley-3.yaml | 4 ++-- 10 files changed, 13 insertions(+), 23 deletions(-) diff --git a/configuration/chairman/byron-shelley/configuration.yaml b/configuration/chairman/byron-shelley/configuration.yaml index e8d24748908..8af8f727c45 100644 --- a/configuration/chairman/byron-shelley/configuration.yaml +++ b/configuration/chairman/byron-shelley/configuration.yaml @@ -55,7 +55,7 @@ ApplicationVersion: 1 TurnOnLogging: True # Enable the collection of various OS metrics such as memory and CPU use. -# These metrics are traced in the context name: 'cardano.node-metrics' and can +# These metrics are traced in the context name: 'cardano.node.metrics' and can # be directed to the logs or monitoring backends. TurnOnLogMetrics: True @@ -278,7 +278,7 @@ options: # redirects traced values to a specific scribe which is identified by its # type and its name, separated by "::": mapScribes: - cardano.node-metrics: + cardano.node.metrics: - "FileSK::logs/mainnet.log" # apply a filter on message severity on messages in a specific named context. diff --git a/configuration/chairman/shelly-only/configuration.yaml b/configuration/chairman/shelly-only/configuration.yaml index 1d19a770d9e..85b9b8898c1 100644 --- a/configuration/chairman/shelly-only/configuration.yaml +++ b/configuration/chairman/shelly-only/configuration.yaml @@ -52,7 +52,7 @@ ApplicationVersion: 1 TurnOnLogging: True # Enable the collection of various OS metrics such as memory and CPU use. -# These metrics are traced in the context name: 'cardano.node-metrics' and can +# These metrics are traced in the context name: 'cardano.node.metrics' and can # be directed to the logs or monitoring backends. TurnOnLogMetrics: True @@ -269,7 +269,7 @@ options: # redirects traced values to a specific scribe which is identified by its # type and its name, separated by "::": mapScribes: - cardano.node-metrics: + cardano.node.metrics: - "FileSK::logs/mainnet.log" # apply a filter on message severity on messages in a specific named context. diff --git a/configuration/defaults/byron-mainnet/configuration.yaml b/configuration/defaults/byron-mainnet/configuration.yaml index ebecb80788b..3b4e9a7da68 100644 --- a/configuration/defaults/byron-mainnet/configuration.yaml +++ b/configuration/defaults/byron-mainnet/configuration.yaml @@ -52,7 +52,7 @@ ApplicationVersion: 1 TurnOnLogging: True # Enable the collection of various OS metrics such as memory and CPU use. -# These metrics are traced in the context name: 'cardano.node-metrics' and can +# These metrics are traced in the context name: 'cardano.node.metrics' and can # be directed to the logs or monitoring backends. TurnOnLogMetrics: True @@ -266,7 +266,7 @@ options: # redirects traced values to a specific scribe which is identified by its # type and its name, separated by "::": mapScribes: - cardano.node-metrics: + cardano.node.metrics: - "FileSK::logs/mainnet.log" # apply a filter on message severity on messages in a specific named context. @@ -275,4 +275,3 @@ options: mapSeverity: cardano.node.ChainDB: Notice cardano.node.DnsSubscription: Debug - diff --git a/configuration/defaults/byron-staging/configuration.yaml b/configuration/defaults/byron-staging/configuration.yaml index ace57acd1e7..9c4057a71f1 100644 --- a/configuration/defaults/byron-staging/configuration.yaml +++ b/configuration/defaults/byron-staging/configuration.yaml @@ -224,8 +224,6 @@ options: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. # - TraceForwarderBK - cardano.node-metrics: - - EKGViewBK # Uncomment it to send node's release, version and commit to 'TraceForwarderBK'. # cardano.node.release: # - TraceForwarderBK diff --git a/configuration/defaults/byron-testnet/configuration.yaml b/configuration/defaults/byron-testnet/configuration.yaml index 9a885268b25..64f6c96e3e2 100644 --- a/configuration/defaults/byron-testnet/configuration.yaml +++ b/configuration/defaults/byron-testnet/configuration.yaml @@ -224,8 +224,6 @@ options: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. # - TraceForwarderBK - cardano.node-metrics: - - EKGViewBK # Uncomment it to send node's release, version and commit to 'TraceForwarderBK'. # cardano.node.release: # - TraceForwarderBK diff --git a/configuration/defaults/mainnet-via-fetcher/configuration.yaml b/configuration/defaults/mainnet-via-fetcher/configuration.yaml index f19b20fcef5..3e9e4e102c2 100644 --- a/configuration/defaults/mainnet-via-fetcher/configuration.yaml +++ b/configuration/defaults/mainnet-via-fetcher/configuration.yaml @@ -217,8 +217,6 @@ options: - EKGViewBK cardano.node.metrics: - EKGViewBK - cardano.node-metrics: - - EKGViewBK # This section is more expressive still, and needs to be properly documented. mapSubtrace: diff --git a/doc/getting-started/understanding-config-files.md b/doc/getting-started/understanding-config-files.md index fd680abc255..8831a530717 100644 --- a/doc/getting-started/understanding-config-files.md +++ b/doc/getting-started/understanding-config-files.md @@ -263,7 +263,7 @@ It is also possible to have more fine grained control over filtering of trace ou ```json "options": { "mapBackends": { - "cardano.node-metrics": [ + "cardano.node.metrics": [ "EKGViewBK" ], "cardano.node.BlockFetchDecision.peers": [ @@ -329,9 +329,6 @@ It is also possible to have more fine grained control over filtering of trace ou "cardano.epoch-validation.utxo-stats": { "subtrace": "NoTrace" }, - "cardano.node-metrics": { - "subtrace": "Neutral" - }, "cardano.node.metrics": { "subtrace": "Neutral" } diff --git a/scripts/lite/configuration/shelley-1.yaml b/scripts/lite/configuration/shelley-1.yaml index e4b5bf95ac6..ec5b86df3f2 100644 --- a/scripts/lite/configuration/shelley-1.yaml +++ b/scripts/lite/configuration/shelley-1.yaml @@ -50,7 +50,7 @@ ApplicationVersion: 1 TurnOnLogging: True # Enable the collection of various OS metrics such as memory and CPU use. -# These metrics are traced in the context name: 'cardano.node-metrics' and can +# These metrics are traced in the context name: 'cardano.node.metrics' and can # be directed to the logs or monitoring backends. TurnOnLogMetrics: False @@ -264,7 +264,7 @@ options: # redirects traced values to a specific scribe which is identified by its # type and its name, separated by "::": mapScribes: - cardano.node-metrics: + cardano.node.metrics: - "FileSK::logs/mainnet.log" # apply a filter on message severity on messages in a specific named context. diff --git a/scripts/lite/configuration/shelley-2.yaml b/scripts/lite/configuration/shelley-2.yaml index e4b5bf95ac6..ec5b86df3f2 100644 --- a/scripts/lite/configuration/shelley-2.yaml +++ b/scripts/lite/configuration/shelley-2.yaml @@ -50,7 +50,7 @@ ApplicationVersion: 1 TurnOnLogging: True # Enable the collection of various OS metrics such as memory and CPU use. -# These metrics are traced in the context name: 'cardano.node-metrics' and can +# These metrics are traced in the context name: 'cardano.node.metrics' and can # be directed to the logs or monitoring backends. TurnOnLogMetrics: False @@ -264,7 +264,7 @@ options: # redirects traced values to a specific scribe which is identified by its # type and its name, separated by "::": mapScribes: - cardano.node-metrics: + cardano.node.metrics: - "FileSK::logs/mainnet.log" # apply a filter on message severity on messages in a specific named context. diff --git a/scripts/lite/configuration/shelley-3.yaml b/scripts/lite/configuration/shelley-3.yaml index e4b5bf95ac6..ec5b86df3f2 100644 --- a/scripts/lite/configuration/shelley-3.yaml +++ b/scripts/lite/configuration/shelley-3.yaml @@ -50,7 +50,7 @@ ApplicationVersion: 1 TurnOnLogging: True # Enable the collection of various OS metrics such as memory and CPU use. -# These metrics are traced in the context name: 'cardano.node-metrics' and can +# These metrics are traced in the context name: 'cardano.node.metrics' and can # be directed to the logs or monitoring backends. TurnOnLogMetrics: False @@ -264,7 +264,7 @@ options: # redirects traced values to a specific scribe which is identified by its # type and its name, separated by "::": mapScribes: - cardano.node-metrics: + cardano.node.metrics: - "FileSK::logs/mainnet.log" # apply a filter on message severity on messages in a specific named context. From 5f72876427acf41c6d46923e0ae58d8d9fd94511 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Fri, 15 Jan 2021 01:43:12 +0300 Subject: [PATCH 3/7] CAD-2477 log config: cardano.node.metrics is all metrics now --- .../chairman/byron-shelley/configuration.yaml | 7 +------ .../chairman/defaults/simpleview/config-0.yaml | 6 ------ .../chairman/defaults/simpleview/config-1.yaml | 6 ------ .../chairman/defaults/simpleview/config-2.yaml | 6 ------ configuration/chairman/shelly-only/configuration.yaml | 11 +---------- .../defaults/byron-mainnet/configuration.yaml | 10 +--------- .../defaults/byron-staging/configuration.yaml | 4 +--- .../defaults/byron-testnet/configuration.yaml | 4 +--- .../defaults/mainnet-via-fetcher/configuration.yaml | 2 -- configuration/defaults/simpleview/config-0.yaml | 6 ------ configuration/defaults/simpleview/config-1.yaml | 6 ------ configuration/defaults/simpleview/config-2.yaml | 6 ------ doc/getting-started/understanding-config-files.md | 6 ------ scripts/lite/configuration/shelley-1.yaml | 5 ----- scripts/lite/configuration/shelley-2.yaml | 5 ----- scripts/lite/configuration/shelley-3.yaml | 5 ----- 16 files changed, 5 insertions(+), 90 deletions(-) diff --git a/configuration/chairman/byron-shelley/configuration.yaml b/configuration/chairman/byron-shelley/configuration.yaml index 8af8f727c45..b7903a149ef 100644 --- a/configuration/chairman/byron-shelley/configuration.yaml +++ b/configuration/chairman/byron-shelley/configuration.yaml @@ -97,7 +97,7 @@ defaultBackends: # traceForwardTo: # tag: RemotePipe # contents: "logs/pipe" -# +# # Example using Windows named pipes: # traceForwardTo: # tag: RemotePipe @@ -257,13 +257,8 @@ options: cardano.node.BlockFetchDecision.peers: - TraceForwarderBK - EKGViewBK - cardano.node.ChainDB.metrics: - - TraceForwarderBK - - EKGViewBK cardano.node.metrics: - TraceForwarderBK - - EKGViewBK - cardano.node.Forge.metrics: - EKGViewBK cardano.node.release: - TraceForwarderBK diff --git a/configuration/chairman/defaults/simpleview/config-0.yaml b/configuration/chairman/defaults/simpleview/config-0.yaml index 3131bf8aae0..6e7346cec28 100644 --- a/configuration/chairman/defaults/simpleview/config-0.yaml +++ b/configuration/chairman/defaults/simpleview/config-0.yaml @@ -65,12 +65,6 @@ options: # `UTxO`-related messages during epoch validation. subtrace: NoTrace mapBackends: - cardano.node.ChainDB.metrics: - - EKGViewBK - cardano.node.metrics.Forge: - - EKGViewBK - cardano.node.metrics.Mempool: - - EKGViewBK cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. diff --git a/configuration/chairman/defaults/simpleview/config-1.yaml b/configuration/chairman/defaults/simpleview/config-1.yaml index 0d28749d0a6..443e1602bff 100644 --- a/configuration/chairman/defaults/simpleview/config-1.yaml +++ b/configuration/chairman/defaults/simpleview/config-1.yaml @@ -65,12 +65,6 @@ options: # `UTxO`-related messages during epoch validation. subtrace: NoTrace mapBackends: - cardano.node.ChainDB.metrics: - - EKGViewBK - cardano.node.metrics.Forge: - - EKGViewBK - cardano.node.metrics.Mempool: - - EKGViewBK cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. diff --git a/configuration/chairman/defaults/simpleview/config-2.yaml b/configuration/chairman/defaults/simpleview/config-2.yaml index da20072727b..78da697d14d 100644 --- a/configuration/chairman/defaults/simpleview/config-2.yaml +++ b/configuration/chairman/defaults/simpleview/config-2.yaml @@ -70,12 +70,6 @@ options: # `UTxO`-related messages during epoch validation. subtrace: NoTrace mapBackends: - cardano.node.ChainDB.metrics: - - EKGViewBK - cardano.node.metrics.Forge: - - EKGViewBK - cardano.node.metrics.Mempool: - - EKGViewBK cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. diff --git a/configuration/chairman/shelly-only/configuration.yaml b/configuration/chairman/shelly-only/configuration.yaml index 85b9b8898c1..e1056321043 100644 --- a/configuration/chairman/shelly-only/configuration.yaml +++ b/configuration/chairman/shelly-only/configuration.yaml @@ -94,7 +94,7 @@ defaultBackends: # traceForwardTo: # tag: RemotePipe # contents: "logs/pipe" -# +# # Example using Windows named pipes: # traceForwardTo: # tag: RemotePipe @@ -245,16 +245,8 @@ options: # an override and not an extension so anything matched here will not # go to the default backend, only to the explicitly listed backends. mapBackends: - cardano.node.BlockFetchDecision.peers: - - TraceForwarderBK - - EKGViewBK - cardano.node.ChainDB.metrics: - - TraceForwarderBK - - EKGViewBK cardano.node.metrics: - TraceForwarderBK - - EKGViewBK - cardano.node.Forge.metrics: - EKGViewBK cardano.node.release: - TraceForwarderBK @@ -281,4 +273,3 @@ options: cardano.node.TraceIpSubscription: Info cardano.node.TraceMux: Info cardano.node.Handshake: Debug - diff --git a/configuration/defaults/byron-mainnet/configuration.yaml b/configuration/defaults/byron-mainnet/configuration.yaml index 3b4e9a7da68..4202b305f27 100644 --- a/configuration/defaults/byron-mainnet/configuration.yaml +++ b/configuration/defaults/byron-mainnet/configuration.yaml @@ -94,7 +94,7 @@ defaultBackends: # traceForwardTo: # tag: RemotePipe # contents: "logs/pipe" -# +# # Example using Windows named pipes: # traceForwardTo: # tag: RemotePipe @@ -242,16 +242,8 @@ options: # an override and not an extension so anything matched here will not # go to the default backend, only to the explicitly listed backends. mapBackends: - cardano.node.BlockFetchDecision.peers: - - TraceForwarderBK - - EKGViewBK - cardano.node.ChainDB.metrics: - - TraceForwarderBK - - EKGViewBK cardano.node.metrics: - TraceForwarderBK - - EKGViewBK - cardano.node.Forge.metrics: - EKGViewBK cardano.node.release: - TraceForwarderBK diff --git a/configuration/defaults/byron-staging/configuration.yaml b/configuration/defaults/byron-staging/configuration.yaml index 9c4057a71f1..52ffa11104a 100644 --- a/configuration/defaults/byron-staging/configuration.yaml +++ b/configuration/defaults/byron-staging/configuration.yaml @@ -218,10 +218,8 @@ options: # an override and not an extension so anything matched here will not # go to the default backend, only to the explicitly listed backends. mapBackends: - cardano.node.ChainDB.metrics: - - EKGViewBK cardano.node.metrics: - - EKGViewBK + - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. # - TraceForwarderBK # Uncomment it to send node's release, version and commit to 'TraceForwarderBK'. diff --git a/configuration/defaults/byron-testnet/configuration.yaml b/configuration/defaults/byron-testnet/configuration.yaml index 64f6c96e3e2..14f078344df 100644 --- a/configuration/defaults/byron-testnet/configuration.yaml +++ b/configuration/defaults/byron-testnet/configuration.yaml @@ -218,10 +218,8 @@ options: # an override and not an extension so anything matched here will not # go to the default backend, only to the explicitly listed backends. mapBackends: - cardano.node.ChainDB.metrics: - - EKGViewBK cardano.node.metrics: - - EKGViewBK + - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. # - TraceForwarderBK # Uncomment it to send node's release, version and commit to 'TraceForwarderBK'. diff --git a/configuration/defaults/mainnet-via-fetcher/configuration.yaml b/configuration/defaults/mainnet-via-fetcher/configuration.yaml index 3e9e4e102c2..db530a091c5 100644 --- a/configuration/defaults/mainnet-via-fetcher/configuration.yaml +++ b/configuration/defaults/mainnet-via-fetcher/configuration.yaml @@ -213,8 +213,6 @@ options: # an override and not an extension so anything matched here will not # go to the default backend, only to the explicitly listed backends. mapBackends: - cardano.node.ChainDB.metrics: - - EKGViewBK cardano.node.metrics: - EKGViewBK diff --git a/configuration/defaults/simpleview/config-0.yaml b/configuration/defaults/simpleview/config-0.yaml index f4e7ee10ce8..6bd5c13c3c9 100644 --- a/configuration/defaults/simpleview/config-0.yaml +++ b/configuration/defaults/simpleview/config-0.yaml @@ -65,12 +65,6 @@ options: # `UTxO`-related messages during epoch validation. subtrace: NoTrace mapBackends: - cardano.node.ChainDB.metrics: - - EKGViewBK - cardano.node.metrics.Forge: - - EKGViewBK - cardano.node.metrics.Mempool: - - EKGViewBK cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. diff --git a/configuration/defaults/simpleview/config-1.yaml b/configuration/defaults/simpleview/config-1.yaml index f5a65a23966..1a59725e32d 100644 --- a/configuration/defaults/simpleview/config-1.yaml +++ b/configuration/defaults/simpleview/config-1.yaml @@ -65,12 +65,6 @@ options: # `UTxO`-related messages during epoch validation. subtrace: NoTrace mapBackends: - cardano.node.ChainDB.metrics: - - EKGViewBK - cardano.node.metrics.Forge: - - EKGViewBK - cardano.node.metrics.Mempool: - - EKGViewBK cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. diff --git a/configuration/defaults/simpleview/config-2.yaml b/configuration/defaults/simpleview/config-2.yaml index 145b8ff0503..a13ac7e5975 100644 --- a/configuration/defaults/simpleview/config-2.yaml +++ b/configuration/defaults/simpleview/config-2.yaml @@ -70,12 +70,6 @@ options: # `UTxO`-related messages during epoch validation. subtrace: NoTrace mapBackends: - cardano.node.ChainDB.metrics: - - EKGViewBK - cardano.node.metrics.Forge: - - EKGViewBK - cardano.node.metrics.Mempool: - - EKGViewBK cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. diff --git a/doc/getting-started/understanding-config-files.md b/doc/getting-started/understanding-config-files.md index 8831a530717..0328e4e2647 100644 --- a/doc/getting-started/understanding-config-files.md +++ b/doc/getting-started/understanding-config-files.md @@ -268,12 +268,6 @@ It is also possible to have more fine grained control over filtering of trace ou ], "cardano.node.BlockFetchDecision.peers": [ "EKGViewBK" - ], - "cardano.node.ChainDB.metrics": [ - "EKGViewBK" - ], - "cardano.node.metrics": [ - "EKGViewBK" ] }, "mapSubtrace": { diff --git a/scripts/lite/configuration/shelley-1.yaml b/scripts/lite/configuration/shelley-1.yaml index ec5b86df3f2..e6dbc624327 100644 --- a/scripts/lite/configuration/shelley-1.yaml +++ b/scripts/lite/configuration/shelley-1.yaml @@ -243,14 +243,9 @@ options: cardano.node.BlockFetchDecision.peers: - TraceForwarderBK - EKGViewBK - cardano.node.ChainDB.metrics: - - TraceForwarderBK - - EKGViewBK cardano.node.metrics: - TraceForwarderBK - EKGViewBK - cardano.node.Forge.metrics: - - EKGViewBK cardano.node.release: - TraceForwarderBK - KatipBK diff --git a/scripts/lite/configuration/shelley-2.yaml b/scripts/lite/configuration/shelley-2.yaml index ec5b86df3f2..e6dbc624327 100644 --- a/scripts/lite/configuration/shelley-2.yaml +++ b/scripts/lite/configuration/shelley-2.yaml @@ -243,14 +243,9 @@ options: cardano.node.BlockFetchDecision.peers: - TraceForwarderBK - EKGViewBK - cardano.node.ChainDB.metrics: - - TraceForwarderBK - - EKGViewBK cardano.node.metrics: - TraceForwarderBK - EKGViewBK - cardano.node.Forge.metrics: - - EKGViewBK cardano.node.release: - TraceForwarderBK - KatipBK diff --git a/scripts/lite/configuration/shelley-3.yaml b/scripts/lite/configuration/shelley-3.yaml index ec5b86df3f2..e6dbc624327 100644 --- a/scripts/lite/configuration/shelley-3.yaml +++ b/scripts/lite/configuration/shelley-3.yaml @@ -243,14 +243,9 @@ options: cardano.node.BlockFetchDecision.peers: - TraceForwarderBK - EKGViewBK - cardano.node.ChainDB.metrics: - - TraceForwarderBK - - EKGViewBK cardano.node.metrics: - TraceForwarderBK - EKGViewBK - cardano.node.Forge.metrics: - - EKGViewBK cardano.node.release: - TraceForwarderBK - KatipBK From 8a78605bd1ff645ce4bb425b5f8d3638a1aba343 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Fri, 15 Jan 2021 01:43:32 +0300 Subject: [PATCH 4/7] CAD-2477 log config: cardano.epoch-validation.utxo-stats is no more --- configuration/chairman/defaults/simpleview/config-0.yaml | 4 ---- configuration/chairman/defaults/simpleview/config-1.yaml | 4 ---- configuration/chairman/defaults/simpleview/config-2.yaml | 4 ---- configuration/defaults/byron-staging/configuration.yaml | 4 ---- configuration/defaults/byron-testnet/configuration.yaml | 4 ---- .../defaults/mainnet-via-fetcher/configuration.yaml | 4 ---- configuration/defaults/simpleview/config-0.yaml | 4 ---- configuration/defaults/simpleview/config-1.yaml | 4 ---- configuration/defaults/simpleview/config-2.yaml | 4 ---- doc/getting-started/understanding-config-files.md | 5 +---- 10 files changed, 1 insertion(+), 40 deletions(-) diff --git a/configuration/chairman/defaults/simpleview/config-0.yaml b/configuration/chairman/defaults/simpleview/config-0.yaml index 6e7346cec28..e893e242be5 100644 --- a/configuration/chairman/defaults/simpleview/config-0.yaml +++ b/configuration/chairman/defaults/simpleview/config-0.yaml @@ -60,10 +60,6 @@ options: - - tag: Contains contents: diff.RTS.gcNum.timed. subtrace: FilterTrace - 'cardano.epoch-validation.utxo-stats': - # Change the `subtrace` value to `Neutral` in order to log - # `UTxO`-related messages during epoch validation. - subtrace: NoTrace mapBackends: cardano.node.metrics: - EKGViewBK diff --git a/configuration/chairman/defaults/simpleview/config-1.yaml b/configuration/chairman/defaults/simpleview/config-1.yaml index 443e1602bff..1c1e3055d28 100644 --- a/configuration/chairman/defaults/simpleview/config-1.yaml +++ b/configuration/chairman/defaults/simpleview/config-1.yaml @@ -60,10 +60,6 @@ options: - - tag: Contains contents: diff.RTS.gcNum.timed. subtrace: FilterTrace - 'cardano.epoch-validation.utxo-stats': - # Change the `subtrace` value to `Neutral` in order to log - # `UTxO`-related messages during epoch validation. - subtrace: NoTrace mapBackends: cardano.node.metrics: - EKGViewBK diff --git a/configuration/chairman/defaults/simpleview/config-2.yaml b/configuration/chairman/defaults/simpleview/config-2.yaml index 78da697d14d..6aaf699e39f 100644 --- a/configuration/chairman/defaults/simpleview/config-2.yaml +++ b/configuration/chairman/defaults/simpleview/config-2.yaml @@ -65,10 +65,6 @@ options: - - tag: Contains contents: diff.RTS.gcNum.timed. subtrace: FilterTrace - 'cardano.epoch-validation.utxo-stats': - # Change the `subtrace` value to `Neutral` in order to log - # `UTxO`-related messages during epoch validation. - subtrace: NoTrace mapBackends: cardano.node.metrics: - EKGViewBK diff --git a/configuration/defaults/byron-staging/configuration.yaml b/configuration/defaults/byron-staging/configuration.yaml index 52ffa11104a..1162c00116c 100644 --- a/configuration/defaults/byron-staging/configuration.yaml +++ b/configuration/defaults/byron-staging/configuration.yaml @@ -252,10 +252,6 @@ options: - - tag: Contains contents: diff.RTS.gcNum.timed. subtrace: FilterTrace - 'cardano.epoch-validation.utxo-stats': - # Change the `subtrace` value to `Neutral` in order to log - # `UTxO`-related messages during epoch validation. - subtrace: NoTrace # If 'TraceForwarderBK' is enabled, uncomment it to forward node's metrics # to remote socket '127.0.0.1:2997'. diff --git a/configuration/defaults/byron-testnet/configuration.yaml b/configuration/defaults/byron-testnet/configuration.yaml index 14f078344df..c9cb6c50174 100644 --- a/configuration/defaults/byron-testnet/configuration.yaml +++ b/configuration/defaults/byron-testnet/configuration.yaml @@ -252,10 +252,6 @@ options: - - tag: Contains contents: diff.RTS.gcNum.timed. subtrace: FilterTrace - 'cardano.epoch-validation.utxo-stats': - # Change the `subtrace` value to `Neutral` in order to log - # `UTxO`-related messages during epoch validation. - subtrace: NoTrace # If 'TraceForwarderBK' is enabled, uncomment it to forward node's metrics # to remote socket '127.0.0.1:2997'. diff --git a/configuration/defaults/mainnet-via-fetcher/configuration.yaml b/configuration/defaults/mainnet-via-fetcher/configuration.yaml index db530a091c5..78d315d8787 100644 --- a/configuration/defaults/mainnet-via-fetcher/configuration.yaml +++ b/configuration/defaults/mainnet-via-fetcher/configuration.yaml @@ -238,7 +238,3 @@ options: - - tag: Contains contents: diff.RTS.gcNum.timed. subtrace: FilterTrace - 'cardano.epoch-validation.utxo-stats': - # Change the `subtrace` value to `Neutral` in order to log - # `UTxO`-related messages during epoch validation. - subtrace: NoTrace diff --git a/configuration/defaults/simpleview/config-0.yaml b/configuration/defaults/simpleview/config-0.yaml index 6bd5c13c3c9..d4add25f320 100644 --- a/configuration/defaults/simpleview/config-0.yaml +++ b/configuration/defaults/simpleview/config-0.yaml @@ -60,10 +60,6 @@ options: - - tag: Contains contents: diff.RTS.gcNum.timed. subtrace: FilterTrace - 'cardano.epoch-validation.utxo-stats': - # Change the `subtrace` value to `Neutral` in order to log - # `UTxO`-related messages during epoch validation. - subtrace: NoTrace mapBackends: cardano.node.metrics: - EKGViewBK diff --git a/configuration/defaults/simpleview/config-1.yaml b/configuration/defaults/simpleview/config-1.yaml index 1a59725e32d..cf6d3de2167 100644 --- a/configuration/defaults/simpleview/config-1.yaml +++ b/configuration/defaults/simpleview/config-1.yaml @@ -60,10 +60,6 @@ options: - - tag: Contains contents: diff.RTS.gcNum.timed. subtrace: FilterTrace - 'cardano.epoch-validation.utxo-stats': - # Change the `subtrace` value to `Neutral` in order to log - # `UTxO`-related messages during epoch validation. - subtrace: NoTrace mapBackends: cardano.node.metrics: - EKGViewBK diff --git a/configuration/defaults/simpleview/config-2.yaml b/configuration/defaults/simpleview/config-2.yaml index a13ac7e5975..0fa1025dbce 100644 --- a/configuration/defaults/simpleview/config-2.yaml +++ b/configuration/defaults/simpleview/config-2.yaml @@ -65,10 +65,6 @@ options: - - tag: Contains contents: diff.RTS.gcNum.timed. subtrace: FilterTrace - 'cardano.epoch-validation.utxo-stats': - # Change the `subtrace` value to `Neutral` in order to log - # `UTxO`-related messages during epoch validation. - subtrace: NoTrace mapBackends: cardano.node.metrics: - EKGViewBK diff --git a/doc/getting-started/understanding-config-files.md b/doc/getting-started/understanding-config-files.md index 0328e4e2647..e06629f63a0 100644 --- a/doc/getting-started/understanding-config-files.md +++ b/doc/getting-started/understanding-config-files.md @@ -320,13 +320,10 @@ It is also possible to have more fine grained control over filtering of trace ou "subtrace": "FilterTrace" }, - "cardano.epoch-validation.utxo-stats": { - "subtrace": "NoTrace" - }, "cardano.node.metrics": { "subtrace": "Neutral" } } } } -``` \ No newline at end of file +``` From 5c9b3c7dff42c32c2de3d0e35a1f713111b14994 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Fri, 15 Jan 2021 18:43:48 +0300 Subject: [PATCH 5/7] CAD-2477 logging: move BlockFetchDecisions.connectedPeers into metrics as well --- cardano-node/src/Cardano/Tracing/Tracers.hs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cardano-node/src/Cardano/Tracing/Tracers.hs b/cardano-node/src/Cardano/Tracing/Tracers.hs index 68f70a152ae..fddaab6ef8f 100644 --- a/cardano-node/src/Cardano/Tracing/Tracers.hs +++ b/cardano-node/src/Cardano/Tracing/Tracers.hs @@ -400,7 +400,7 @@ traceChainMetrics tr = Tracer $ \ev -> doTrace :: ChainInformation -> IO () doTrace ChainInformation { slots, blocks, density, epoch, slotInEpoch } = do -- TODO this is executed each time the chain changes. How cheap is it? - meta <- mkLOMeta Critical Confidential + meta <- mkLOMeta Critical Public let traceD :: Text -> Double -> IO () traceD msg d = traceNamedObject tr (meta, LogValue msg (PureD d)) traceI :: Integral a => Text -> a -> IO () @@ -449,7 +449,7 @@ mkConsensusTracers trSel verb tr nodeKern fStats = do , Consensus.chainSyncServerHeaderTracer = tracerOnOff (traceChainSyncHeaderServer trSel) verb "ChainSyncHeaderServer" tr , Consensus.chainSyncServerBlockTracer = tracerOnOff (traceChainSyncHeaderServer trSel) verb "ChainSyncBlockServer" tr , Consensus.blockFetchDecisionTracer = tracerOnOff' (traceBlockFetchDecisions trSel) $ - annotateSeverity $ teeTraceBlockFetchDecision verb elidedFetchDecision $ appendName "BlockFetchDecision" tr + annotateSeverity $ teeTraceBlockFetchDecision verb elidedFetchDecision tr , Consensus.blockFetchClientTracer = tracerOnOff (traceBlockFetchClient trSel) verb "BlockFetchClient" tr , Consensus.blockFetchServerTracer = tracerOnOff (traceBlockFetchServer trSel) verb "BlockFetchServer" tr , Consensus.forgeStateInfoTracer = tracerOnOff' (traceForgeStateInfo trSel) $ @@ -878,9 +878,11 @@ teeTraceBlockFetchDecision -> Tracer IO (WithSeverity [TraceLabelPeer peer (FetchDecision [Point (Header blk)])]) teeTraceBlockFetchDecision verb eliding tr = Tracer $ \ev -> do - traceWith (teeTraceBlockFetchDecision' tr) ev - traceWith (teeTraceBlockFetchDecisionElide verb eliding tr) ev - + traceWith (teeTraceBlockFetchDecision' meTr) ev + traceWith (teeTraceBlockFetchDecisionElide verb eliding bfdTr) ev + where + meTr = appendName "metrics" tr + bfdTr = appendName "BlockFetchDecision" tr teeTraceBlockFetchDecision' :: Trace IO Text @@ -888,8 +890,7 @@ teeTraceBlockFetchDecision' teeTraceBlockFetchDecision' tr = Tracer $ \(WithSeverity _ peers) -> do meta <- mkLOMeta Info Confidential - let tr' = appendName "peers" tr - traceNamedObject tr' (meta, LogValue "connectedPeers" . PureI $ fromIntegral $ length peers) + traceNamedObject tr (meta, LogValue "connectedPeers" . PureI $ fromIntegral $ length peers) teeTraceBlockFetchDecisionElide :: ( Eq peer From e9584f53ab703fba50b0e1fdbe8ab5a622565ecb Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Giraudeau Date: Fri, 15 Jan 2021 17:27:09 +0100 Subject: [PATCH 6/7] Remove obsolete metrics mappings from config files --- configuration/cardano/mainnet-config.json | 66 ------------------- configuration/cardano/shelley_qa-config.json | 66 ------------------- .../chairman/byron-shelley/configuration.yaml | 3 - .../defaults/simpleview/config-0.yaml | 20 ------ .../defaults/simpleview/config-1.yaml | 20 ------ .../defaults/simpleview/config-2.yaml | 25 ------- .../defaults/byron-staging/configuration.yaml | 23 ------- .../defaults/byron-testnet/configuration.yaml | 23 ------- .../mainnet-via-fetcher/configuration.yaml | 23 ------- .../defaults/simpleview/config-0.yaml | 20 ------ .../defaults/simpleview/config-1.yaml | 20 ------ .../defaults/simpleview/config-2.yaml | 25 ------- .../understanding-config-files.md | 52 --------------- scripts/lite/configuration/shelley-1.yaml | 4 -- scripts/lite/configuration/shelley-2.yaml | 4 -- scripts/lite/configuration/shelley-3.yaml | 4 -- 16 files changed, 398 deletions(-) diff --git a/configuration/cardano/mainnet-config.json b/configuration/cardano/mainnet-config.json index 6eae7165da1..9035b7a27f1 100644 --- a/configuration/cardano/mainnet-config.json +++ b/configuration/cardano/mainnet-config.json @@ -57,77 +57,11 @@ "minSeverity": "Info", "options": { "mapBackends": { - "cardano.node-metrics": [ - "EKGViewBK" - ], - "cardano.node.BlockFetchDecision.peers": [ - "EKGViewBK" - ], - "cardano.node.ChainDB.metrics": [ - "EKGViewBK" - ], - "cardano.node.Forge.metrics": [ - "EKGViewBK" - ], "cardano.node.metrics": [ "EKGViewBK" ] }, "mapSubtrace": { - "#ekgview": { - "contents": [ - [ - { - "contents": "cardano.epoch-validation.benchmark", - "tag": "Contains" - }, - [ - { - "contents": ".monoclock.basic.", - "tag": "Contains" - } - ] - ], - [ - { - "contents": "cardano.epoch-validation.benchmark", - "tag": "Contains" - }, - [ - { - "contents": "diff.RTS.cpuNs.timed.", - "tag": "Contains" - } - ] - ], - [ - { - "contents": "#ekgview.#aggregation.cardano.epoch-validation.benchmark", - "tag": "StartsWith" - }, - [ - { - "contents": "diff.RTS.gcNum.timed.", - "tag": "Contains" - } - ] - ] - ], - "subtrace": "FilterTrace" - }, - "benchmark": { - "contents": [ - "GhcRtsStats", - "MonotonicClock" - ], - "subtrace": "ObservableTrace" - }, - "cardano.epoch-validation.utxo-stats": { - "subtrace": "NoTrace" - }, - "cardano.node-metrics": { - "subtrace": "Neutral" - }, "cardano.node.metrics": { "subtrace": "Neutral" } diff --git a/configuration/cardano/shelley_qa-config.json b/configuration/cardano/shelley_qa-config.json index 5704f17867f..834b62f2c28 100644 --- a/configuration/cardano/shelley_qa-config.json +++ b/configuration/cardano/shelley_qa-config.json @@ -59,77 +59,11 @@ "minSeverity": "Debug", "options": { "mapBackends": { - "cardano.node-metrics": [ - "EKGViewBK" - ], - "cardano.node.BlockFetchDecision.peers": [ - "EKGViewBK" - ], - "cardano.node.ChainDB.metrics": [ - "EKGViewBK" - ], - "cardano.node.Forge.metrics": [ - "EKGViewBK" - ], "cardano.node.metrics": [ "EKGViewBK" ] }, "mapSubtrace": { - "#ekgview": { - "contents": [ - [ - { - "contents": "cardano.epoch-validation.benchmark", - "tag": "Contains" - }, - [ - { - "contents": ".monoclock.basic.", - "tag": "Contains" - } - ] - ], - [ - { - "contents": "cardano.epoch-validation.benchmark", - "tag": "Contains" - }, - [ - { - "contents": "diff.RTS.cpuNs.timed.", - "tag": "Contains" - } - ] - ], - [ - { - "contents": "#ekgview.#aggregation.cardano.epoch-validation.benchmark", - "tag": "StartsWith" - }, - [ - { - "contents": "diff.RTS.gcNum.timed.", - "tag": "Contains" - } - ] - ] - ], - "subtrace": "FilterTrace" - }, - "benchmark": { - "contents": [ - "GhcRtsStats", - "MonotonicClock" - ], - "subtrace": "ObservableTrace" - }, - "cardano.epoch-validation.utxo-stats": { - "subtrace": "NoTrace" - }, - "cardano.node-metrics": { - "subtrace": "Neutral" - }, "cardano.node.metrics": { "subtrace": "Neutral" } diff --git a/configuration/chairman/byron-shelley/configuration.yaml b/configuration/chairman/byron-shelley/configuration.yaml index b7903a149ef..c76f9ba34de 100644 --- a/configuration/chairman/byron-shelley/configuration.yaml +++ b/configuration/chairman/byron-shelley/configuration.yaml @@ -254,9 +254,6 @@ options: # an override and not an extension so anything matched here will not # go to the default backend, only to the explicitly listed backends. mapBackends: - cardano.node.BlockFetchDecision.peers: - - TraceForwarderBK - - EKGViewBK cardano.node.metrics: - TraceForwarderBK - EKGViewBK diff --git a/configuration/chairman/defaults/simpleview/config-0.yaml b/configuration/chairman/defaults/simpleview/config-0.yaml index e893e242be5..fdf827b9afd 100644 --- a/configuration/chairman/defaults/simpleview/config-0.yaml +++ b/configuration/chairman/defaults/simpleview/config-0.yaml @@ -44,31 +44,11 @@ defaultScribes: # more options which can be passed as key-value pairs: options: - mapSubtrace: - '#ekgview': - contents: - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: .monoclock.basic. - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.cpuNs.timed. - - - tag: StartsWith - contents: '#ekgview.#aggregation.cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.gcNum.timed. - subtrace: FilterTrace mapBackends: cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. # - TraceForwarderBK - cardano.node.peers: - - EKGViewBK - cardano.node.BlockFetchDecision.peers: - - EKGViewBK # Uncomment it to send node's release, version and commit to 'TraceForwarderBK'. # cardano.node.release: # - TraceForwarderBK diff --git a/configuration/chairman/defaults/simpleview/config-1.yaml b/configuration/chairman/defaults/simpleview/config-1.yaml index 1c1e3055d28..110ec9be19b 100644 --- a/configuration/chairman/defaults/simpleview/config-1.yaml +++ b/configuration/chairman/defaults/simpleview/config-1.yaml @@ -44,31 +44,11 @@ defaultScribes: # more options which can be passed as key-value pairs: options: - mapSubtrace: - '#ekgview': - contents: - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: .monoclock.basic. - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.cpuNs.timed. - - - tag: StartsWith - contents: '#ekgview.#aggregation.cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.gcNum.timed. - subtrace: FilterTrace mapBackends: cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. # - TraceForwarderBK - cardano.node.peers: - - EKGViewBK - cardano.node.BlockFetchDecision.peers: - - EKGViewBK # Uncomment it to send node's release, version and commit to 'TraceForwarderBK'. # cardano.node.release: # - TraceForwarderBK diff --git a/configuration/chairman/defaults/simpleview/config-2.yaml b/configuration/chairman/defaults/simpleview/config-2.yaml index 6aaf699e39f..c124dd8d7eb 100644 --- a/configuration/chairman/defaults/simpleview/config-2.yaml +++ b/configuration/chairman/defaults/simpleview/config-2.yaml @@ -44,36 +44,11 @@ defaultScribes: # more options which can be passed as key-value pairs: options: - mapSubtrace: - benchmark: - contents: - - GhcRtsStats - - MonotonicClock - subtrace: ObservableTrace - '#ekgview': - contents: - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: .monoclock.basic. - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.cpuNs.timed. - - - tag: StartsWith - contents: '#ekgview.#aggregation.cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.gcNum.timed. - subtrace: FilterTrace mapBackends: cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. # - TraceForwarderBK - cardano.node.peers: - - EKGViewBK - cardano.node.BlockFetchDecision.peers: - - EKGViewBK # Uncomment it to send node's release, version and commit to 'TraceForwarderBK'. # cardano.node.release: # - TraceForwarderBK diff --git a/configuration/defaults/byron-staging/configuration.yaml b/configuration/defaults/byron-staging/configuration.yaml index 1162c00116c..86ff92eefa6 100644 --- a/configuration/defaults/byron-staging/configuration.yaml +++ b/configuration/defaults/byron-staging/configuration.yaml @@ -230,29 +230,6 @@ options: # cardano.node.commit: # - TraceForwarderBK - # This section is more expressive still, and needs to be properly documented. - mapSubtrace: - benchmark: - contents: - - GhcRtsStats - - MonotonicClock - subtrace: ObservableTrace - '#ekgview': - contents: - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: .monoclock.basic. - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.cpuNs.timed. - - - tag: StartsWith - contents: '#ekgview.#aggregation.cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.gcNum.timed. - subtrace: FilterTrace - # If 'TraceForwarderBK' is enabled, uncomment it to forward node's metrics # to remote socket '127.0.0.1:2997'. # traceForwardTo: diff --git a/configuration/defaults/byron-testnet/configuration.yaml b/configuration/defaults/byron-testnet/configuration.yaml index c9cb6c50174..8cfaa468c16 100644 --- a/configuration/defaults/byron-testnet/configuration.yaml +++ b/configuration/defaults/byron-testnet/configuration.yaml @@ -230,29 +230,6 @@ options: # cardano.node.commit: # - TraceForwarderBK - # This section is more expressive still, and needs to be properly documented. - mapSubtrace: - benchmark: - contents: - - GhcRtsStats - - MonotonicClock - subtrace: ObservableTrace - '#ekgview': - contents: - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: .monoclock.basic. - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.cpuNs.timed. - - - tag: StartsWith - contents: '#ekgview.#aggregation.cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.gcNum.timed. - subtrace: FilterTrace - # If 'TraceForwarderBK' is enabled, uncomment it to forward node's metrics # to remote socket '127.0.0.1:2997'. # traceForwardTo: diff --git a/configuration/defaults/mainnet-via-fetcher/configuration.yaml b/configuration/defaults/mainnet-via-fetcher/configuration.yaml index 78d315d8787..fe2da75ed7a 100644 --- a/configuration/defaults/mainnet-via-fetcher/configuration.yaml +++ b/configuration/defaults/mainnet-via-fetcher/configuration.yaml @@ -215,26 +215,3 @@ options: mapBackends: cardano.node.metrics: - EKGViewBK - - # This section is more expressive still, and needs to be properly documented. - mapSubtrace: - benchmark: - contents: - - GhcRtsStats - - MonotonicClock - subtrace: ObservableTrace - '#ekgview': - contents: - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: .monoclock.basic. - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.cpuNs.timed. - - - tag: StartsWith - contents: '#ekgview.#aggregation.cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.gcNum.timed. - subtrace: FilterTrace diff --git a/configuration/defaults/simpleview/config-0.yaml b/configuration/defaults/simpleview/config-0.yaml index d4add25f320..b6f20b27ed7 100644 --- a/configuration/defaults/simpleview/config-0.yaml +++ b/configuration/defaults/simpleview/config-0.yaml @@ -44,31 +44,11 @@ defaultScribes: # more options which can be passed as key-value pairs: options: - mapSubtrace: - '#ekgview': - contents: - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: .monoclock.basic. - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.cpuNs.timed. - - - tag: StartsWith - contents: '#ekgview.#aggregation.cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.gcNum.timed. - subtrace: FilterTrace mapBackends: cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. # - TraceForwarderBK - cardano.node.peers: - - EKGViewBK - cardano.node.BlockFetchDecision.peers: - - EKGViewBK # Uncomment it to send node's release, version and commit to 'TraceForwarderBK'. # cardano.node.release: # - TraceForwarderBK diff --git a/configuration/defaults/simpleview/config-1.yaml b/configuration/defaults/simpleview/config-1.yaml index cf6d3de2167..73a9c6ff196 100644 --- a/configuration/defaults/simpleview/config-1.yaml +++ b/configuration/defaults/simpleview/config-1.yaml @@ -44,31 +44,11 @@ defaultScribes: # more options which can be passed as key-value pairs: options: - mapSubtrace: - '#ekgview': - contents: - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: .monoclock.basic. - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.cpuNs.timed. - - - tag: StartsWith - contents: '#ekgview.#aggregation.cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.gcNum.timed. - subtrace: FilterTrace mapBackends: cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. # - TraceForwarderBK - cardano.node.peers: - - EKGViewBK - cardano.node.BlockFetchDecision.peers: - - EKGViewBK # Uncomment it to send node's release, version and commit to 'TraceForwarderBK'. # cardano.node.release: # - TraceForwarderBK diff --git a/configuration/defaults/simpleview/config-2.yaml b/configuration/defaults/simpleview/config-2.yaml index 0fa1025dbce..5c7e09afbfe 100644 --- a/configuration/defaults/simpleview/config-2.yaml +++ b/configuration/defaults/simpleview/config-2.yaml @@ -44,36 +44,11 @@ defaultScribes: # more options which can be passed as key-value pairs: options: - mapSubtrace: - benchmark: - contents: - - GhcRtsStats - - MonotonicClock - subtrace: ObservableTrace - '#ekgview': - contents: - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: .monoclock.basic. - - - tag: Contains - contents: 'cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.cpuNs.timed. - - - tag: StartsWith - contents: '#ekgview.#aggregation.cardano.epoch-validation.benchmark' - - - tag: Contains - contents: diff.RTS.gcNum.timed. - subtrace: FilterTrace mapBackends: cardano.node.metrics: - EKGViewBK # Uncomment it to send 'cardano.node.metrics' to 'TraceForwarderBK' as well. # - TraceForwarderBK - cardano.node.peers: - - EKGViewBK - cardano.node.BlockFetchDecision.peers: - - EKGViewBK # Uncomment it to send node's release, version and commit to 'TraceForwarderBK'. # cardano.node.release: # - TraceForwarderBK diff --git a/doc/getting-started/understanding-config-files.md b/doc/getting-started/understanding-config-files.md index e06629f63a0..334d939ef17 100644 --- a/doc/getting-started/understanding-config-files.md +++ b/doc/getting-started/understanding-config-files.md @@ -265,61 +265,9 @@ It is also possible to have more fine grained control over filtering of trace ou "mapBackends": { "cardano.node.metrics": [ "EKGViewBK" - ], - "cardano.node.BlockFetchDecision.peers": [ - "EKGViewBK" ] }, "mapSubtrace": { - "benchmark": { - "contents": [ - "GhcRtsStats", - "MonotonicClock" - ], - "subtrace": "ObservableTrace" - }, - "#ekgview": { - "contents": [ - [ - { - "contents": "cardano.epoch-validation.benchmark", - "tag": "Contains" - }, - [ - { - "contents": ".monoclock.basic.", - "tag": "Contains" - } - ] - ], - [ - { - "contents": "cardano.epoch-validation.benchmark", - "tag": "Contains" - }, - [ - { - "contents": "diff.RTS.cpuNs.timed.", - "tag": "Contains" - } - ] - ], - [ - { - "contents": "#ekgview.#aggregation.cardano.epoch-validation.benchmark", - "tag": "StartsWith" - }, - [ - { - "contents": "diff.RTS.gcNum.timed.", - "tag": "Contains" - } - ] - ] - ], - "subtrace": "FilterTrace" - }, - "cardano.node.metrics": { "subtrace": "Neutral" } diff --git a/scripts/lite/configuration/shelley-1.yaml b/scripts/lite/configuration/shelley-1.yaml index e6dbc624327..59ca995f3bd 100644 --- a/scripts/lite/configuration/shelley-1.yaml +++ b/scripts/lite/configuration/shelley-1.yaml @@ -240,9 +240,6 @@ options: # an override and not an extension so anything matched here will not # go to the default backend, only to the explicitly listed backends. mapBackends: - cardano.node.BlockFetchDecision.peers: - - TraceForwarderBK - - EKGViewBK cardano.node.metrics: - TraceForwarderBK - EKGViewBK @@ -268,4 +265,3 @@ options: mapSeverity: cardano.node.ChainDB: Notice cardano.node.DnsSubscription: Debug - diff --git a/scripts/lite/configuration/shelley-2.yaml b/scripts/lite/configuration/shelley-2.yaml index e6dbc624327..59ca995f3bd 100644 --- a/scripts/lite/configuration/shelley-2.yaml +++ b/scripts/lite/configuration/shelley-2.yaml @@ -240,9 +240,6 @@ options: # an override and not an extension so anything matched here will not # go to the default backend, only to the explicitly listed backends. mapBackends: - cardano.node.BlockFetchDecision.peers: - - TraceForwarderBK - - EKGViewBK cardano.node.metrics: - TraceForwarderBK - EKGViewBK @@ -268,4 +265,3 @@ options: mapSeverity: cardano.node.ChainDB: Notice cardano.node.DnsSubscription: Debug - diff --git a/scripts/lite/configuration/shelley-3.yaml b/scripts/lite/configuration/shelley-3.yaml index e6dbc624327..59ca995f3bd 100644 --- a/scripts/lite/configuration/shelley-3.yaml +++ b/scripts/lite/configuration/shelley-3.yaml @@ -240,9 +240,6 @@ options: # an override and not an extension so anything matched here will not # go to the default backend, only to the explicitly listed backends. mapBackends: - cardano.node.BlockFetchDecision.peers: - - TraceForwarderBK - - EKGViewBK cardano.node.metrics: - TraceForwarderBK - EKGViewBK @@ -268,4 +265,3 @@ options: mapSeverity: cardano.node.ChainDB: Notice cardano.node.DnsSubscription: Debug - From d2e37a685742d2c902c19cd8158e498e149f751d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Giraudeau Date: Fri, 15 Jan 2021 17:34:58 +0100 Subject: [PATCH 7/7] Update iohk-nix for metrics mapping cleanup. --- nix/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index 4abbf8b4c05..6a1fd2bf34c 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -41,10 +41,10 @@ "homepage": null, "owner": "input-output-hk", "repo": "iohk-nix", - "rev": "5b86d63a0b59b7666d19901b654d8fbde27d9500", - "sha256": "1mfb93nnw0x4gyq93v6lh6h7imliw4j0wp5l9gpdafy3rw621xzb", + "rev": "62757227a2b3202ae30b807f2b2aa9a927d34e0e", + "sha256": "15pzi61whix3hzkbac924993dxzf2bx7jlrbg4mma3c1saaa7n1g", "type": "tarball", - "url": "https://github.com/input-output-hk/iohk-nix/archive/5b86d63a0b59b7666d19901b654d8fbde27d9500.tar.gz", + "url": "https://github.com/input-output-hk/iohk-nix/archive/62757227a2b3202ae30b807f2b2aa9a927d34e0e.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } }