@@ -867,22 +867,24 @@ mkConsensusTracers mbEKGDirect trSel verb tr nodeKern fStats = do
867
867
mkForgeTracers :: IO ForgeTracers
868
868
mkForgeTracers = do
869
869
-- We probably don't want to pay the extra IO cost per-counter-increment. -- sk
870
- staticMeta <- mkLOMeta Critical Confidential
870
+ metaCritical <- mkLOMeta Critical Confidential
871
+ metaInfo <- mkLOMeta Info Public
872
+ metaError <- mkLOMeta Error Public
871
873
let name :: LoggerName = " metrics.Forge"
872
874
ForgeTracers
873
- <$> counting (liftCounting staticMeta name " forged" tr)
874
- <*> counting (liftCounting staticMeta name " forge-about-to-lead" tr)
875
- <*> counting (liftCounting staticMeta name " could-not-forge" tr)
876
- <*> counting (liftCounting staticMeta name " adopted" tr)
877
- <*> counting (liftCounting staticMeta name " didnt-adopt" tr)
878
- <*> counting (liftCounting staticMeta name " forged-invalid" tr)
879
- <*> counting (liftCounting staticMeta name " node-not-leader" tr)
880
- <*> counting (liftCounting staticMeta name " cannot-forge" tr)
881
- <*> counting (liftCounting staticMeta name " forge-state-update-error" tr)
882
- <*> counting (liftCounting staticMeta name " block-from-future" tr)
883
- <*> counting (liftCounting staticMeta name " slot-is-immutable" tr)
884
- <*> counting (liftCounting staticMeta name " node-is-leader" tr)
885
- <*> counting (liftCounting staticMeta name " adoption-thread-died" tr)
875
+ <$> counting (liftCounting metaInfo name " forged" tr)
876
+ <*> counting (liftCounting metaInfo name " forge-about-to-lead" tr)
877
+ <*> counting (liftCounting metaError name " could-not-forge" tr)
878
+ <*> counting (liftCounting metaInfo name " adopted" tr)
879
+ <*> counting (liftCounting metaError name " didnt-adopt" tr)
880
+ <*> counting (liftCounting metaError name " forged-invalid" tr)
881
+ <*> counting (liftCounting metaInfo name " node-not-leader" tr)
882
+ <*> counting (liftCounting metaError name " cannot-forge" tr)
883
+ <*> counting (liftCounting metaCritical name " forge-state-update-error" tr)
884
+ <*> counting (liftCounting metaError name " block-from-future" tr)
885
+ <*> counting (liftCounting metaError name " slot-is-immutable" tr)
886
+ <*> counting (liftCounting metaInfo name " node-is-leader" tr)
887
+ <*> counting (liftCounting metaError name " adoption-thread-died" tr)
886
888
887
889
traceServedCount :: Maybe EKGDirect -> TraceChainSyncServerEvent blk -> IO ()
888
890
traceServedCount Nothing _ = pure ()
@@ -1397,21 +1399,25 @@ forgeStateInfoMetricsTraceTransformer p tr = Tracer $
1397
1399
$ fromIntegral kesPeriodsUntilExpiry
1398
1400
]
1399
1401
1400
- meta <- mkLOMeta Critical Confidential
1401
- mapM_ (traceNamedObject metricsTr . (meta ,)) logValues
1402
+ metaInfo <- mkLOMeta Info Public
1403
+ mapM_ (traceNamedObject metricsTr . (metaInfo ,)) logValues
1402
1404
1403
1405
-- Trace warning messages on the last 7 KES periods and, in the
1404
1406
-- final and subsequent KES periods, trace alert messages.
1405
1407
metaWarning <- mkLOMeta Warning Public
1406
1408
metaAlert <- mkLOMeta Alert Public
1407
- when (kesPeriodsUntilExpiry <= 7 ) $
1408
- traceWith tr
1409
- ( mempty
1410
- , LogObject
1411
- mempty
1412
- (if kesPeriodsUntilExpiry <= 1 then metaAlert else metaWarning)
1413
- (LogStructuredText mempty (expiryLogMessage kesPeriodsUntilExpiry))
1414
- )
1409
+ traceWith tr
1410
+ ( mempty
1411
+ , LogObject
1412
+ mempty
1413
+ (if kesPeriodsUntilExpiry > 7
1414
+ then metaInfo
1415
+ else if kesPeriodsUntilExpiry > 1
1416
+ then metaWarning
1417
+ else metaAlert
1418
+ )
1419
+ (LogStructuredText mempty (expiryLogMessage kesPeriodsUntilExpiry))
1420
+ )
1415
1421
where
1416
1422
expiryLogMessage :: Word -> Text
1417
1423
expiryLogMessage kesPeriodsUntilExpiry =
0 commit comments