diff --git a/cabal.project b/cabal.project index e0be13bd995..6d7a68407d3 100644 --- a/cabal.project +++ b/cabal.project @@ -31,17 +31,6 @@ packages: trace-dispatcher trace-resources trace-forward - -- ../cardano-api/cardano-api - -- ../ouroboros-consensus/ouroboros-consensus - -- ../ouroboros-consensus/ouroboros-consensus-cardano - -- ../ouroboros-consensus/ouroboros-consensus-protocol - -- ../ouroboros-consensus/ouroboros-consensus-diffusion - -- ../ouroboros-consensus/ouroboros-consensus-observe - -- ../cardano-ledger/eras/alonzo/impl - -- ../cardano-ledger/eras/conway/impl - -- ../cardano-ledger/eras/shelley/impl - -- ../cardano-ledger/eras/shelley/test-suite - -- ../cardano-ledger/libs/cardano-ledger-core extra-packages: Cabal @@ -121,8 +110,8 @@ source-repository-package source-repository-package type: git location: https://github.com/IntersectMBO/ouroboros-consensus - tag: 8eeb4c4e50477c9470dce221ba1396bab6fbf472 - --sha256: sha256-Lt/S/thAvAvkdJ5Gn1ErxRnMLPUY5UvxX2IFHQM+1sA= + tag: 0dac44526e8ee9fa49cddaa164bd3beea4cdc0d1 + --sha256: sha256-pshHHLhM4EdsZhBK16N1FDQ3clsCMjGT08yWJYsAuH8= subdir: ouroboros-consensus ouroboros-consensus-cardano @@ -134,8 +123,8 @@ source-repository-package source-repository-package type: git location: https://github.com/IntersectMBO/cardano-ledger.git - tag: 1327573bfb86f7e596151f77d03fc38982be8749 - --sha256: sha256-CzA6eucrpsc8WMAtG9aNP0DcGtCxghHe0HSX+Yxvcd8= + tag: 6b831537f4dd3863da18c9a2a82b81d946a12052 + --sha256: sha256-YI5tb+kcY4uDOCiK42AD+j1JvfVWc8IgO6Acr7HBEnc= subdir: eras/alonzo/impl eras/conway/impl diff --git a/cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs b/cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs index 76d3a74c101..720b49dda6d 100644 --- a/cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs +++ b/cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs @@ -2285,40 +2285,47 @@ instance ( StandardHash blk forHuman = showT ------ - instance LogFormatting TraceLeiosKernel where - forHuman = showT - forMachine _dtal = traceLeiosKernelToObject - - asMetrics (TraceLeiosBlockForged{eb, ebMeasure}) = - [ CounterM "Forge.endorser-block.total-count" Nothing - , CounterM "Forge.endorser-block.total-tx-count" (Just . fromIntegral . length $ leiosEbTxs eb) - , CounterM "Forge.endorser-block.total-tx-bytes" (Just . fromInteger . toInteger . unByteSize32 . txMeasureMetricTxSizeBytes $ ebMeasure) - , CounterM "Forge.endorser-block.total-tx-xu-memory" (Just . fromInteger . toInteger . txMeasureMetricExUnitsMemory $ ebMeasure) - , CounterM "Forge.endorser-block.total-tx-xu-time" (Just . fromInteger . toInteger . txMeasureMetricExUnitsSteps $ ebMeasure) - , CounterM "Forge.endorser-block.total-tx-ref-script-size-bytes" (Just . fromInteger . toInteger . unByteSize32 . txMeasureMetricRefScriptsSizeBytes $ ebMeasure) - ] - asMetrics _ = [] + forHuman = showT + forMachine _dtal = traceLeiosKernelToObject + + asMetrics (TraceLeiosBlockForged{eb, ebMeasure}) = + [ CounterM "Forge.endorser-block.total-count" Nothing + , CounterM "Forge.endorser-block.total-tx-count" (Just . fromIntegral . length $ leiosEbTxs eb) + , CounterM "Forge.endorser-block.total-tx-bytes" (Just . fromInteger . toInteger . unByteSize32 . txMeasureMetricTxSizeBytes $ ebMeasure) + , CounterM "Forge.endorser-block.total-tx-xu-memory" (Just . fromInteger . toInteger . txMeasureMetricExUnitsMemory $ ebMeasure) + , CounterM "Forge.endorser-block.total-tx-xu-time" (Just . fromInteger . toInteger . txMeasureMetricExUnitsSteps $ ebMeasure) + , CounterM "Forge.endorser-block.total-tx-ref-script-size-bytes" (Just . fromInteger . toInteger . unByteSize32 . txMeasureMetricRefScriptsSizeBytes $ ebMeasure) + ] + asMetrics _ = [] instance MetaTrace TraceLeiosKernel where - namespaceFor _ = Namespace [] [] + namespaceFor _ = Namespace [ ] [ "TraceLeiosKernel" ] - severityFor _ (Just TraceLeiosDbException{}) = Just Error - severityFor _ _ = Just Debug + severityFor _ (Just TraceLeiosDbException{}) = Just Error + severityFor _ _ = Just Debug - documentFor _ = Nothing - allNamespaces = [ Namespace [] [] ] + documentFor _ = Nothing + allNamespaces = [Namespace [] [ "TraceLeiosKernel" ]] + + metricsDocFor _ = + [ ("Forge.endorser-block.total-count", "Counter of forged endorser blocks") + , ("Forge.endorser-block.total-tx-count", "Total number of transactions in the forged endorser block") + , ("Forge.endorser-block.total-tx-bytes", "Total transaction bytes in the forged endorser block") + , ("Forge.endorser-block.total-tx-xu-memory", "Total execution units (memory) in the forged endorser block") + , ("Forge.endorser-block.total-tx-xu-time", "Total execution units (time) in the forged endorser block") + , ("Forge.endorser-block.total-tx-ref-script-size-bytes", "Total reference script size bytes in the forged endorser block") + ] instance LogFormatting TraceLeiosPeer where - forHuman = showT - forMachine _dtal = traceLeiosPeerToObject + forHuman = showT + forMachine _dtal = traceLeiosPeerToObject instance MetaTrace TraceLeiosPeer where - namespaceFor _ = Namespace [] [] + namespaceFor _ = Namespace [] [ "TraceLeiosPeer" ] - severityFor _ (Just TraceLeiosPeerDbException{}) = Just Error - severityFor _ _ = Just Debug + severityFor _ (Just TraceLeiosPeerDbException{}) = Just Error + severityFor _ _ = Just Debug - documentFor _ = Nothing - allNamespaces = [ Namespace [] [] ] + documentFor _ = Nothing + allNamespaces = [Namespace [] [ "TraceLeiosPeer" ]] diff --git a/cardano-node/src/Cardano/Tracing/Config.hs b/cardano-node/src/Cardano/Tracing/Config.hs index 158c0a498d6..48a42106f10 100644 --- a/cardano-node/src/Cardano/Tracing/Config.hs +++ b/cardano-node/src/Cardano/Tracing/Config.hs @@ -351,8 +351,7 @@ instance Semigroup PartialTraceSelection where instance FromJSON PartialTraceSelection where parseJSON = withObject "PartialTraceSelection" $ \v -> do - PartialTraceSelection - <$> Last <$> v .:? "TracingVerbosity" + (PartialTraceSelection . Last <$> (v .:? "TracingVerbosity")) <*> parseTracer (Proxy @TraceAcceptPolicy) v <*> parseTracer (Proxy @TraceBlockchainTime) v <*> parseTracer (Proxy @TraceBlockFetchClient) v