Skip to content

Commit dbf343f

Browse files
committed
tracing: block-fetch
Use the same severities in the new tracing system as in the old one.
1 parent bcba24b commit dbf343f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,24 @@ instance LogFormatting (FetchDecision [Point header]) where
736736
]
737737

738738
instance MetaTrace (FetchDecision [Point header]) where
739+
namespaceFor (Left FetchDeclineChainIntersectionTooDeep)
740+
= Namespace [] ["Decline", "ChainIntersectionTooDeep"]
741+
namespaceFor (Left FetchDeclineChainNotPlausible)
742+
= Namespace [] ["Decline", "FetchDeclineChainNotPlausible"]
743+
namespaceFor (Left FetchDeclineAlreadyFetched)
744+
= Namespace [] ["Decline", "FetchDeclineAlreadyFetched"]
745+
namespaceFor (Left FetchDeclineInFlightThisPeer)
746+
= Namespace [] ["Decline", "FetchDeclineInFlightThisPeer"]
747+
namespaceFor (Left FetchDeclineInFlightOtherPeer)
748+
= Namespace [] ["Decline", "FetchDeclineInFlightOtherPeer"]
739749
namespaceFor (Left _) = Namespace [] ["Decline"]
740750
namespaceFor (Right _) = Namespace [] ["Accept"]
741751

752+
severityFor (Namespace _ ["Decline", "FetchDeclineChainNotPlausible"]) _ = Just Debug
753+
severityFor (Namespace _ ["Decline", "ChainIntersectionTooDeep"]) _ = Just Notice
754+
severityFor (Namespace _ ["Decline", "FetchDeclineAlreadyFetched"]) _ = Just Debug
755+
severityFor (Namespace _ ["Decline", "FetchDeclineInFlightThisPeer"]) _ = Just Debug
756+
severityFor (Namespace _ ["Decline", "FetchDeclineInFlightOtherPeer"]) _ = Just Debug
742757
severityFor (Namespace _ ["Decline"]) _ = Just Info
743758
severityFor (Namespace _ ["Accept"]) _ = Just Info
744759
severityFor _ _ = Nothing

0 commit comments

Comments
 (0)