Skip to content

Commit

Permalink
Start EKG backend
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Nov 19, 2020
1 parent eabbddb commit 52ffb6f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/cli/cardano-wallet-cli.cabal
Expand Up @@ -43,6 +43,7 @@ library
, fmt
, http-client
, iohk-monitoring
, lobemo-backend-ekg
, servant-client
, servant-client-core
, text
Expand Down
9 changes: 8 additions & 1 deletion lib/cli/src/Cardano/CLI.hs
Expand Up @@ -100,6 +100,8 @@ module Cardano.CLI
import Prelude hiding
( getLine )

import Cardano.BM.Data.Configuration
( Endpoint(..) )
import Cardano.BM.Backend.Switchboard
( Switchboard )
import Cardano.BM.Configuration.Static
Expand Down Expand Up @@ -306,8 +308,10 @@ import System.IO
, stdin
, stdout
)
import Cardano.BM.Plugin (loadPlugin)

import qualified Cardano.BM.Configuration.Model as CM
import qualified Cardano.BM.Backend.EKGView as EKG
import qualified Cardano.BM.Data.BackendKind as CM
import qualified Command.Key as Key
import qualified Command.RecoveryPhrase as RecoveryPhrase
Expand Down Expand Up @@ -1585,11 +1589,14 @@ initTracer
initTracer loggerName outputs = do
cfg <- do
c <- defaultConfigStdout
CM.setSetupBackends c [CM.KatipBK, CM.AggregationBK]
CM.setSetupBackends c [CM.KatipBK, CM.AggregationBK, CM.EKGViewBK]
CM.setSetupScribes c $ map mkScribe outputs
CM.setDefaultScribes c $ map mkScribeId outputs
CM.setEKGBindAddr c $ Just (Endpoint ("127.0.0.1", 13788))
CM.setPrometheusBindAddr c $ Just ("127.0.0.1", 13798)
pure c
(tr, sb) <- setupTrace_ cfg loggerName
EKG.plugin cfg tr sb >>= loadPlugin sb
pure (sb, (cfg, tr))

-- | See 'withLoggingNamed'
Expand Down
1 change: 1 addition & 0 deletions nix/.stack.nix/cardano-wallet-cli.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 52ffb6f

Please sign in to comment.