opentracing-jaeger 0.2.2 → 0.3.0
raw patch · 11 files changed
+31/−16 lines, 11 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- CHANGELOG.md +10/−0
- gen-src/Agent/Client.hs +1/−1
- gen-src/Agent/Server.hs +1/−1
- gen-src/Agent/Types.hs +1/−1
- gen-src/Jaeger/Client.hs +1/−1
- gen-src/Jaeger/Server.hs +1/−1
- gen-src/Jaeger/Types.hs +1/−1
- gen-src/Zipkincore/Server.hs +1/−1
- gen-src/Zipkincore/Types.hs +1/−1
- opentracing-jaeger.cabal +4/−4
- src/OpenTracing/Jaeger/CollectorReporter.hs +9/−4
CHANGELOG.md view
@@ -1,3 +1,13 @@+* 0.3.0 (2023-09-28)++ - GHC 8.x is no longer tested, the minimum version is 9.2.8+ - Various fixes the Jaeger backend+ - Fix Zipkin backend to use POST (#49)+ - Use a bounded queue for the batch reporter (#46)++ This release is considered _breaking_ due to #46, and (potential)+ incompatibility with older GHCs.+ * 0.2.2 (2022-05-09) Support for base 4.16 / GHC 9.2
gen-src/Agent/Client.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE TypeFamilies, DeriveGeneric, TypeApplications, OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-name-shadowing -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -Wno-unused-imports -Wno-name-shadowing -Wno-unused-matches #-} module Agent.Client where
gen-src/Agent/Server.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE TypeFamilies, DeriveGeneric, TypeApplications, OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-name-shadowing -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -Wno-unused-imports -Wno-name-shadowing -Wno-unused-matches #-} module Agent.Server where
gen-src/Agent/Types.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE TypeFamilies, DeriveGeneric, TypeApplications, OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-name-shadowing -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -Wno-unused-imports -Wno-name-shadowing -Wno-unused-matches #-} module Agent.Types where
gen-src/Jaeger/Client.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE TypeFamilies, DeriveGeneric, TypeApplications, OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-name-shadowing -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -Wno-unused-imports -Wno-name-shadowing -Wno-unused-matches #-} module Jaeger.Client where
gen-src/Jaeger/Server.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE TypeFamilies, DeriveGeneric, TypeApplications, OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-name-shadowing -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -Wno-unused-imports -Wno-name-shadowing -Wno-unused-matches #-} module Jaeger.Server where
gen-src/Jaeger/Types.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE TypeFamilies, DeriveGeneric, TypeApplications, OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-name-shadowing -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -Wno-unused-imports -Wno-name-shadowing -Wno-unused-matches #-} module Jaeger.Types where
gen-src/Zipkincore/Server.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE TypeFamilies, DeriveGeneric, TypeApplications, OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-name-shadowing -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -Wno-unused-imports -Wno-name-shadowing -Wno-unused-matches #-} module Zipkincore.Server where
gen-src/Zipkincore/Types.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE TypeFamilies, DeriveGeneric, TypeApplications, OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-name-shadowing -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -Wno-unused-imports -Wno-name-shadowing -Wno-unused-matches #-} module Zipkincore.Types where
opentracing-jaeger.cabal view
@@ -1,13 +1,13 @@ cabal-version: 2.2 name: opentracing-jaeger-version: 0.2.2+version: 0.3.0 synopsis: Jaeger backend for OpenTracing homepage: https://github.com/kim/opentracing bug-reports: https://github.com/kim/opentracing/issues author: Kim Altintop-maintainer: Kim Altintop <kim.altintop+opentracing@gmail.com>-copyright: Copyright (c) 2017-2018 Kim Altintop+maintainer: Kim Altintop <kim@eagain.io>+copyright: Copyright (c) 2017-2023 Kim Altintop license: Apache-2.0 license-file: LICENSE build-type: Simple@@ -47,7 +47,7 @@ -Wnoncanonical-monad-instances build-depends: QuickCheck- , base >= 4.9 && < 4.17+ , base >= 4.9 && < 4.19 , bytestring >= 0.10 , exceptions >= 0.8 , hashable >= 1.2
src/OpenTracing/Jaeger/CollectorReporter.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} @@ -33,12 +34,12 @@ import Control.Monad (unless) import Control.Monad.Catch import Control.Monad.IO.Class-import Data.ByteString.Lazy (fromStrict) import Data.ByteString.Builder import Data.Text (Text) import Data.Vector (fromList) import qualified Jaeger.Types as Thrift import Network.HTTP.Client+import Network.HTTP.Types (hContentType) import Network.HTTP.Types.Status import OpenTracing.Jaeger.Propagation (jaegerPropagation) import OpenTracing.Jaeger.Thrift@@ -86,7 +87,11 @@ <> ":" <> show (view (jcoAddr . addrPort) opt) <> "/api/traces?format=jaeger.thrift"- pure rq { method = "POST", secure = view (jcoAddr . addrSecure) opt }+ pure rq+ { method = "POST"+ , secure = view (jcoAddr . addrSecure) opt+ , requestHeaders = [(hContentType, "application/x-thrift")]+ } tproc = toThriftProcess _jcoServiceName _jcoServiceTags @@ -117,13 +122,13 @@ -> [FinishedSpan] -> IO () reporter mgr errlog rq tproc (fromList -> spans) = do- rs <- responseStatus <$> httpLbs rq { requestBody = body } mgr+ rs <- responseStatus <$> httpNoBody rq { requestBody = body } mgr unless (statusIsSuccessful rs) $ errlog $ shortByteString "Error from Jaeger Collector: " <> intDec (statusCode rs) <> char8 '\n' where- body = RequestBodyLBS . fromStrict . serializeBatch $ toThriftBatch tproc spans+ body = RequestBodyBS . serializeBatch $ toThriftBatch tproc spans -- nb. collector accepts 'BinaryProtocol', but agent 'CompactProtocol' serializeBatch = Pinch.encode Pinch.binaryProtocol