tmp-proc-zipkin 0.7.0.0 → 0.8.0.0
raw patch · 3 files changed
+30/−6 lines, 3 filesdep ~tmp-procPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: tmp-proc
API changes (from Hackage documentation)
- System.TmpProc.Docker.Zipkin: -- <i>a-postgres-db</i>
+ System.TmpProc.Docker.Zipkin: -- e.g, <i>a-postgres-db</i>
+ System.TmpProc.Docker.Zipkin: addrHost :: HostIpAddress -> SvcURI
+ System.TmpProc.Docker.Zipkin: addrPort :: HostIpAddress -> Word16 -> SvcURI
+ System.TmpProc.Docker.Zipkin: containerPort :: Proc a => Word16
+ System.TmpProc.Docker.Zipkin: type Conn a = (conn :: Type) | conn -> a;
+ System.TmpProc.Docker.Zipkin: type Image a :: Symbol;
+ System.TmpProc.Docker.Zipkin: type Name a = (labelName :: Symbol) | labelName -> a;
+ System.TmpProc.Docker.Zipkin: uriOfRootless :: Proc a => HostIpAddress -> Word16 -> SvcURI
+ System.TmpProc.Docker.Zipkin: uriOfRootlessWith :: Proc a => HostIpAddress -> [(Word16, Word16)] -> SvcURI
- System.TmpProc.Docker.Zipkin: data () => HList (a :: [Type])
+ System.TmpProc.Docker.Zipkin: data HList (a :: [Type])
- System.TmpProc.Docker.Zipkin: data () => Pinged
+ System.TmpProc.Docker.Zipkin: data Pinged
- System.TmpProc.Docker.Zipkin: data () => ProcHandle a
+ System.TmpProc.Docker.Zipkin: data ProcHandle a
Files
- ChangeLog.md +7/−0
- src/System/TmpProc/Docker/Zipkin.hs +21/−4
- tmp-proc-zipkin.cabal +2/−2
ChangeLog.md view
@@ -2,6 +2,13 @@ `tmp-proc-zipkin` uses [PVP Versioning][1]. +## 0.8.0.0 -- 2026-10-18++* Extend the upper bound for tmp-proc to allow 0.8+* Add `uriOfRootlessWith` to `TmpZipkin` for rootless docker support+* Fix `toSettings` to use `hUri` instead of `hAddr` so that both ping and+ connection work in rootless mode+ ## 0.7.0.0 -- 2024-05-12 * Extend the upper bound for tmp-proc to allow 0.7
src/System/TmpProc/Docker/Zipkin.hs view
@@ -36,8 +36,7 @@ import Control.Monad.Trace.Class (MonadTrace, alwaysSampled, rootSpan) import qualified Data.ByteString.Char8 as C8 import Data.Proxy (Proxy (..))-import Data.String (fromString)-import qualified Data.Text as Text+import Monitor.Tracing.Zipkin (defaultSettings, settingsHostname, settingsPort) import qualified Monitor.Tracing.Zipkin as ZPK import Network.HTTP.Client (HttpException) import System.IO@@ -55,6 +54,8 @@ , Proc (..) , ProcHandle (..) , SvcURI+ , addrHost+ , addrPort , only , startupAll , toPinged@@ -88,6 +89,10 @@ ZPK.run tracedPing z ZPK.publish z reset _ = pure ()+ uriOfRootlessWith addr pairs =+ case lookup 9411 pairs of+ Just hp -> "http://" <> addrPort addr hp <> "/"+ Nothing -> mkUri' addr {- | Specifies how to connect to a tmp @ZipKin@ service.@@ -103,11 +108,23 @@ -- | Make a simple HTTP uri to the zipkin server. mkUri' :: HostIpAddress -> SvcURI-mkUri' ip = "http://" <> C8.pack (Text.unpack ip) <> "/"+mkUri' ip = "http://" <> addrHost ip <> "/" toSettings :: ProcHandle TmpZipkin -> ZPK.Settings-toSettings = fromString . Text.unpack . hAddr+toSettings h =+ let uri = C8.unpack $ hUri h+ -- strip "http://" prefix and trailing "/"+ stripped = reverse . dropWhile (== '/') . reverse . drop 7 $ uri+ (hostname, portPart) = break (== ':') stripped+ in defaultSettings+ { settingsHostname = Just hostname+ , settingsPort = case drop 1 portPart of+ [] -> Nothing+ portStr -> case reads portStr of+ [(p, "")] -> Just (fromIntegral (p :: Int))+ _ -> Nothing+ } pingAction :: IO ()
tmp-proc-zipkin.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: tmp-proc-zipkin-version: 0.7.0.0+version: 0.8.0.0 synopsis: Launch ZipKin in docker using tmp-proc description: Demos how to use tmp-proc to run ZipKin in docker in a unittest.@@ -31,7 +31,7 @@ , bytestring >=0.10.8.2 && <0.12.2 , http-client >=0.5.13.1 && <0.8.0.0 , text >=1.2.3 && <2.2- , tmp-proc >=0.5.3 && <0.8+ , tmp-proc >=0.5.3 && <0.9 , tracing >=0.0.7.2 && <0.1.0 default-language: Haskell2010