Skip to content

Commit e87337c

Browse files
committed
GSM tracer: adapt severities
These trace messages are quite rare and (especially with Genesis) the GSM state has a significant effect on the behavior of the node.
1 parent 9f0440a commit e87337c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2105,10 +2105,10 @@ instance MetaTrace (TraceGsmEvent selection) where
21052105

21062106
severityFor ns _ =
21072107
case ns of
2108-
Namespace _ ["EnterCaughtUp"] -> Just Info
2109-
Namespace _ ["LeaveCaughtUp"] -> Just Info
2110-
Namespace _ ["PreSyncingToSyncing"] -> Just Info
2111-
Namespace _ ["SyncingToPreSyncing"] -> Just Info
2108+
Namespace _ ["EnterCaughtUp"] -> Just Notice
2109+
Namespace _ ["LeaveCaughtUp"] -> Just Warning
2110+
Namespace _ ["PreSyncingToSyncing"] -> Just Notice
2111+
Namespace _ ["SyncingToPreSyncing"] -> Just Notice
21122112
Namespace _ _ -> Nothing
21132113

21142114
documentFor = \case

cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,8 +1756,14 @@ instance ToObject (TraceLocalTxSubmissionServerEvent blk) where
17561756
mconcat [ "kind" .= String "TraceLocalTxSubmissionServerEvent" ]
17571757

17581758
instance HasPrivacyAnnotation (TraceGsmEvent selection) where
1759+
17591760
instance HasSeverityAnnotation (TraceGsmEvent selection) where
1760-
getSeverityAnnotation _ = Info
1761+
getSeverityAnnotation = \case
1762+
GsmEventEnterCaughtUp{} -> Notice
1763+
GsmEventLeaveCaughtUp{} -> Warning
1764+
GsmEventPreSyncingToSyncing{} -> Notice
1765+
GsmEventSyncingToPreSyncing{} -> Notice
1766+
17611767
instance ToObject selection => Transformable Text IO (TraceGsmEvent selection) where
17621768
trTransformer = trStructured
17631769

0 commit comments

Comments
 (0)