Skip to content
Permalink
Browse files

Run byron-proxy with iohk-monitoring & Prometheus.

  • Loading branch information...
365andreas committed May 14, 2019
1 parent ed7879a commit 9c1de315afdc6b558f646e96dba4ba98f558ffc7
@@ -9,13 +9,13 @@ packages: byron-proxy.cabal
source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: b656651fd3c357860d8136598b223b048c195eae
tag: cecf1f4ef0858761342159ca482bffb3038ec8c8
subdir: iohk-monitoring

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: b656651fd3c357860d8136598b223b048c195eae
tag: cecf1f4ef0858761342159ca482bffb3038ec8c8
subdir: contra-tracer

--
@@ -0,0 +1,40 @@
# global filter; messages must have at least this severity to pass:
minSeverity: Debug

# these backends are initialized:
setupBackends:
- EKGViewBK
- KatipBK

# if not indicated otherwise, then messages are passed to these backends:
defaultBackends:
- EKGViewBK
- KatipBK

# if wanted, the GUI is listening on this port:
# hasGUI: 18321

# if wanted, the EKG interface is listening on this port:
hasEKG: 12789

# if wanted, the Prometheus interface is using this port:
hasPrometheus: 12799

# here we set up outputs of logging in 'katip':
setupScribes:
- scKind: StdoutSK
scFormat: ScText
scName: stdout

# if not indicated otherwise, then log output is directed to this:
defaultScribes:
- - StdoutSK
- stdout

# more options which can be passed as key-value pairs:
options:
mapSubtrace:
'#messagecounters.switchboard':
subtrace: NoTrace
'#messagecounters.ekgview':
subtrace: NoTrace
@@ -12,10 +12,11 @@ import Control.Monad.Class.MonadST (MonadST)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Resource (ResourceT, runResourceT)
import Control.Tracer (Tracer (..), contramap, nullTracer, traceWith)
import Control.Tracer (Tracer (..), nullTracer, traceWith)
import qualified Data.ByteString.Lazy as Lazy (ByteString, fromStrict)
import qualified Data.ByteString.Lazy.Char8 as Lazy (pack)
import Data.Either (either)
import Data.Functor.Contravariant (contramap)
import qualified Data.Map as Map

import Network.TypedProtocol.Channel (hoistChannel)
@@ -10,9 +10,9 @@ import Control.Concurrent (myThreadId)
import Control.Concurrent.Async (concurrently)
import Control.Concurrent.STM (STM, atomically, retry)
import Control.Monad (forM_)
import Control.Tracer (Tracer (..), contramap, traceWith)
import Control.Tracer (Tracer (..), traceWith)
import qualified Data.ByteString.Lazy as Lazy (fromStrict)
import Data.Functor.Contravariant (Op (..))
import Data.Functor.Contravariant (Op (..), contramap)
import Data.List (intercalate)
import Data.List.NonEmpty (NonEmpty)
import qualified Data.List.NonEmpty as NE
@@ -219,12 +219,14 @@ defaultLoggerConfig = Monitoring.Representation
, Monitoring.setupBackends = [Monitoring.KatipBK]
, Monitoring.defaultBackends = [Monitoring.KatipBK]
, Monitoring.hasEKG = Nothing
, Monitoring.hasPrometheus = Nothing
, Monitoring.hasGUI = Nothing
, Monitoring.options = mempty
}
where
stdoutScribe = Monitoring.ScribeDefinition
{ Monitoring.scKind = Monitoring.StdoutSK
, Monitoring.scFormat = Monitoring.ScText
, Monitoring.scName = "stdout"
, Monitoring.scPrivacy = Monitoring.ScPublic
, Monitoring.scRotation = Nothing
@@ -33,6 +33,7 @@ import Control.Monad (void)
import Crypto.Random (ChaChaDRG)
import Data.Map.Strict (Map)
import Data.Void (Void)
import Data.Functor.Contravariant (contramap)

import Control.Monad.Class.MonadAsync
import Control.Monad.Class.MonadFork (MonadFork)

0 comments on commit 9c1de31

Please sign in to comment.
You can’t perform that action at this time.