File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
cardano-node/src/Cardano/Node/Tracing/Tracers Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -2095,6 +2095,17 @@ instance ( LogFormatting selection
2095
2095
2096
2096
forHuman = showT
2097
2097
2098
+ asMetrics =
2099
+ \ case
2100
+ GsmEventEnterCaughtUp {} -> [caughtUp]
2101
+ GsmEventLeaveCaughtUp {} -> [preSyncing]
2102
+ GsmEventPreSyncingToSyncing {} -> [syncing]
2103
+ GsmEventSyncingToPreSyncing {} -> [preSyncing]
2104
+ where
2105
+ preSyncing = IntM " GSM.state" 0
2106
+ syncing = IntM " GSM.state" 1
2107
+ caughtUp = IntM " GSM.state" 2
2108
+
2098
2109
instance MetaTrace (TraceGsmEvent selection ) where
2099
2110
namespaceFor =
2100
2111
\ case
@@ -2125,6 +2136,19 @@ instance MetaTrace (TraceGsmEvent selection) where
2125
2136
Namespace _ _ ->
2126
2137
Nothing
2127
2138
2139
+ metricsDocFor = \ case
2140
+ Namespace _ [" EnterCaughtUp" ] -> doc
2141
+ Namespace _ [" LeaveCaughtUp" ] -> doc
2142
+ Namespace _ [" PreSyncingToSyncing" ] -> doc
2143
+ Namespace _ [" SyncingToPreSyncing" ] -> doc
2144
+ Namespace _ _ -> []
2145
+ where
2146
+ doc =
2147
+ [ (" GSM.state"
2148
+ , " The state of the Genesis State Machine. 0 = PreSyncing, 1 = Syncing, 2 = CaughtUp."
2149
+ )
2150
+ ]
2151
+
2128
2152
allNamespaces =
2129
2153
[ Namespace [] [" EnterCaughtUp" ]
2130
2154
, Namespace [] [" LeaveCaughtUp" ]
You can’t perform that action at this time.
0 commit comments