Skip to content

Commit

Permalink
Even more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jutaro committed May 6, 2024
1 parent 97c8b4e commit e987486
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins/backend-ekg/src/Cardano/BM/Backend/Prometheus.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import Snap.Http.Server (Config, ConfigLog (..), defaultConfig, setAcc
import System.Metrics (Value (..), sampleAll)
import qualified System.Remote.Monitoring as EKG
import Debug.Trace
\end{code}
%endif

Expand Down Expand Up @@ -96,11 +98,12 @@ spawnPrometheus ekg host port prometheusOutput = Async.async $
[ case sv of
Counter c -> renderNamedValue sk (int64Dec c)
Gauge g -> renderNamedValue sk (int64Dec g)
Label l -> if isFloat l
Label l -> trace ("renderSamples " <> l) $
if isFloat l
then renderNamedValue sk (byteString $ encodeUtf8 l)
else if "{" `T.isPrefixOf` l
then renderLabel sk l
else trace ("renderSamples " <> l) lmempty
else trace ("renderSamples " <> l) mempty
_ -> mempty
| (sk,sv) <- samples ]
Expand Down

0 comments on commit e987486

Please sign in to comment.