lightstep-haskell 0.9.0 → 0.10.0
raw patch · 3 files changed
+10/−10 lines, 3 files
Files
- lightstep-haskell.cabal +1/−1
- src/LightStep/HighLevel/IO.hs +3/−3
- stress-test/Main.hs +6/−6
lightstep-haskell.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: lightstep-haskell-version: 0.9.0+version: 0.10.0 synopsis: LightStep OpenTracing client library description: LightStep OpenTracing client library. Uses GRPC transport via proto-lens. category: Tools
src/LightStep/HighLevel/IO.hs view
@@ -42,10 +42,10 @@ showLogEntryKey (Custom x) = x withSpan :: forall m a. MonadIO m => MonadMask m => T.Text -> m a -> m a-withSpan opName action = withSpanAndSomeInitialTags opName [] action+withSpan opName action = withSpanAndTags opName [] action -withSpanAndSomeInitialTags :: forall m a. MonadIO m => MonadMask m => T.Text -> [(T.Text, T.Text)] -> m a -> m a-withSpanAndSomeInitialTags opName initialTags action =+withSpanAndTags :: forall m a. MonadIO m => MonadMask m => T.Text -> [(T.Text, T.Text)] -> m a -> m a+withSpanAndTags opName initialTags action = fst <$> generalBracket (pushSpan opName initialTags) (\sp exitcase -> do
stress-test/Main.hs view
@@ -13,12 +13,12 @@ seriousBusinessMain = concurrently_ frontend backend where frontend =- withSpanAndSomeInitialTags "RESTful API" [("foo", "bar")] $ do+ withSpanAndTags "RESTful API" [("foo", "bar")] $ do threadDelay 10000- withSpanAndSomeInitialTags "Kafka" [("foo", "baz")] $ do+ withSpanAndTags "Kafka" [("foo", "baz")] $ do threadDelay 20000 threadDelay 30000- withSpanAndSomeInitialTags "GraphQL" [("foo", "quux"), ("lorem", "ipsum")] $ do+ withSpanAndTags "GraphQL" [("foo", "quux"), ("lorem", "ipsum")] $ do threadDelay 40000 addLog Event "monkey-job" addLog (Custom "foo") "bar"@@ -35,12 +35,12 @@ backend = withSpan "Background Data Science" $ do threadDelay 10000- withSpanAndSomeInitialTags "Tensorflow" [("learning", "deep")] $ do+ withSpanAndTags "Tensorflow" [("learning", "deep")] $ do threadDelay 100000 setTag "learning" "deep"- withSpanAndSomeInitialTags "Torch" [("learning", "very_deep")] $ do+ withSpanAndTags "Torch" [("learning", "very_deep")] $ do threadDelay 100000- withSpanAndSomeInitialTags "Hadoop" [("learning", "super_deep")]$ do+ withSpanAndTags "Hadoop" [("learning", "super_deep")]$ do threadDelay 100000 reportMemoryUsage :: IO ()