Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
59 changes: 33 additions & 26 deletions cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]]
3 changes: 1 addition & 2 deletions cardano-node/src/Cardano/Tracing/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading