1- {-# LANGUAGE AllowAmbiguousTypes #-}
2-
31module Pos.Infra.Reporting.Http
42 ( sendReport
53 , sendReportNodeImpl
@@ -13,11 +11,13 @@ import Control.Exception.Safe (catchAny, try)
1311import Data.Aeson (encode )
1412import qualified Data.List.NonEmpty as NE
1513import Data.Time.Clock (getCurrentTime )
14+ import Data.Version (showVersion )
1615import Formatting (sformat , shown , string , (%) )
1716import Network.HTTP.Client (httpLbs , newManager , parseUrlThrow )
1817import qualified Network.HTTP.Client.MultipartFormData as Form
1918import Network.HTTP.Client.TLS (tlsManagerSettings )
20- import Pos.ReportServer.Report (ReportInfo (.. ), ReportType (.. ))
19+ import Pos.ReportServer.Report (BackendVersion (.. ), ReportInfo (.. ), ReportType (.. ),
20+ Version (.. ))
2121import System.FilePath (takeFileName )
2222import System.Info (arch , os )
2323
@@ -26,7 +26,7 @@ import Pos.Crypto (ProtocolMagic (..))
2626import Pos.Infra.Reporting.Exceptions (ReportingError (.. ))
2727import Pos.Infra.Reporting.MemState ()
2828import Pos.Util.CompileInfo (CompileTimeInfo )
29- import Pos.Util.Trace (Trace , Severity (.. ), traceWith )
29+ import Pos.Util.Trace (Severity (.. ), Trace , traceWith )
3030import Pos.Util.Util ((<//>) )
3131
3232
@@ -69,7 +69,7 @@ sendReport pm compileInfo mLogFile reportType appName reportServerUri = do
6969 -- We are using version of 'cardano-sl-infra' here. We agreed
7070 -- that the version of 'cardano-sl' and it subpackages should
7171 -- be same.
72- , rVersion = version
72+ , rVersion = BackendVersion . Version . fromString . showVersion $ version
7373 , rBuild = pretty compileInfo
7474 , rOS = toText (os <> " -" <> arch)
7575 , rMagic = getProtocolMagic pm
0 commit comments