packages feed

instana-haskell-trace-sdk 0.6.1.0 → 0.6.2.0

raw patch · 19 files changed

+256/−44 lines, 19 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Instana.SDK.SDK: setSynthetic :: MonadIO m => InstanaContext -> Bool -> m ()
+ Instana.SDK.Span.EntrySpan: setSynthetic :: Bool -> EntrySpan -> EntrySpan
+ Instana.SDK.Span.EntrySpan: synthetic :: EntrySpan -> Bool
+ Instana.SDK.Span.NonRootEntry: [synthetic] :: NonRootEntry -> Bool
+ Instana.SDK.Span.NonRootEntry: setSynthetic :: Bool -> NonRootEntry -> NonRootEntry
+ Instana.SDK.Span.RootEntry: [synthetic] :: RootEntry -> Bool
+ Instana.SDK.Span.RootEntry: setSynthetic :: Bool -> RootEntry -> RootEntry
+ Instana.SDK.Span.Span: setSynthetic :: Bool -> Span -> Span
+ Instana.SDK.Span.Span: synthetic :: Span -> Bool
+ Instana.SDK.TracingHeaders: [synthetic] :: TracingHeaders -> Bool
+ Instana.SDK.TracingHeaders: syntheticHeaderName :: HeaderName
- Instana.SDK.Span.NonRootEntry: NonRootEntry :: Id -> Id -> Id -> Text -> Int -> Int -> Maybe Text -> Value -> NonRootEntry
+ Instana.SDK.Span.NonRootEntry: NonRootEntry :: Id -> Id -> Id -> Text -> Int -> Int -> Maybe Text -> Bool -> Value -> NonRootEntry
- Instana.SDK.Span.RootEntry: RootEntry :: Id -> Text -> Int -> Int -> Maybe Text -> Maybe Text -> Maybe Text -> Value -> RootEntry
+ Instana.SDK.Span.RootEntry: RootEntry :: Id -> Text -> Int -> Int -> Maybe Text -> Bool -> Maybe Text -> Maybe Text -> Value -> RootEntry
- Instana.SDK.TracingHeaders: TracingHeaders :: Maybe String -> Maybe String -> TracingLevel -> Maybe String -> Maybe String -> TracingHeaders
+ Instana.SDK.TracingHeaders: TracingHeaders :: Maybe String -> Maybe String -> TracingLevel -> Maybe String -> Maybe String -> Bool -> TracingHeaders

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog for instana-haskell-trace-sdk +## 0.6.2.0+- Fix: Ignore incoming X-INSTANA-T/-S if website monitoring correlation data is present.+- Add support for X-INSTANA-SYNTHETIC+ ## 0.6.1.0 - Fix: Capture HTTP status code in `postProcessHttpRespons` even if an the currently active span is an exit. 
CONTRIBUTING.md view
@@ -65,8 +65,7 @@     * `instana-haskell-trace-sdk.cabal`     * `package.yaml`     * `test/integration/Instana/SDK/IntegrationTest/Metrics.hs` (assertion for `sensorVersion`)-* Update `README.md` with API changes.-* Update `CHANGELOG.md` (update/add entry)+* Update `README.md` with API changes (if any). * Commit and push this change with a commit comment like `chore: version a.b.c.d` * Wait for the CI build for branch main. * Build the package with stack and upload it to Hackage:
README.md view
@@ -20,7 +20,7 @@  ``` extra-deps:-- instana-haskell-trace-sdk-0.6.1.0+- instana-haskell-trace-sdk-0.6.2.0 ```  Depending on the stack resolver you use, you might also need to add `aeson-extra` to your extra-deps:
instana-haskell-trace-sdk.cabal view
@@ -1,5 +1,5 @@ name:           instana-haskell-trace-sdk-version:        0.6.1.0+version:        0.6.2.0 synopsis:       SDK for adding custom Instana tracing support to Haskell applications. description:    Please also see the README on Github at <https://github.com/instana/haskell-trace-sdk#readme> homepage:       https://www.instana.com/
src/Instana/SDK/Internal/WireSpan.hs view
@@ -99,6 +99,7 @@   , serviceName     :: Maybe Text   , correlationType :: Maybe Text   , correlationId   :: Maybe Text+  , synthetic       :: Maybe Bool   , spanData        :: Value   } deriving (Eq, Generic, Show) @@ -141,6 +142,7 @@       , "ec"    .= errorCount span_       , "crtp"  .= correlationType span_       , "crid"  .= correlationId span_+      , "sy"    .= synthetic span_       , "data"  .= spanData_       , "f"     .= From pid_ agentUuid_       ]
src/Instana/SDK/Internal/Worker.hs view
@@ -139,6 +139,8 @@       , WireSpan.serviceName     = EntrySpan.serviceName entrySpan       , WireSpan.correlationType = EntrySpan.correlationType entrySpan       , WireSpan.correlationId   = EntrySpan.correlationId entrySpan+      , WireSpan.synthetic       =+          if EntrySpan.synthetic entrySpan then Just True else Nothing       , WireSpan.spanData        = EntrySpan.spanData entrySpan       } @@ -162,6 +164,7 @@       , WireSpan.serviceName     = ExitSpan.serviceName exitSpan       , WireSpan.correlationType = Nothing       , WireSpan.correlationId   = Nothing+      , WireSpan.synthetic       = Nothing       , WireSpan.spanData        = ExitSpan.spanData exitSpan       } 
src/Instana/SDK/SDK.hs view
@@ -42,6 +42,7 @@     , setCorrelationId     , setCorrelationType     , setServiceName+    , setSynthetic     , startEntry     , startExit     , startHttpEntry@@ -313,12 +314,20 @@     tracingHeaders = readHttpTracingHeaders request     traceId = TracingHeaders.traceId tracingHeaders     spanId = TracingHeaders.spanId tracingHeaders+    synthetic = TracingHeaders.synthetic tracingHeaders     level = TracingHeaders.level tracingHeaders+    (traceId', spanId') =+      case TracingHeaders.correlationId tracingHeaders of+        Nothing ->+          (traceId, spanId)+        Just _ ->+          (Nothing, Nothing)+   case level of     TracingHeaders.Trace -> do       let-        io' = addDataFromRequest context request io-      case (traceId, spanId) of+        io' = addDataFromRequest context request synthetic io+      case (traceId', spanId') of         (Just t, Just s) ->           withEntry context t s spanType io'         _                -> do@@ -342,19 +351,31 @@  -- |Takes an IO action and appends another side effecto to it that will add HTTP -- data from the given request to the current span.-addDataFromRequest :: MonadIO m => InstanaContext -> Wai.Request -> m a -> m a-addDataFromRequest context request originalIO =-  originalIO >>= addHttpDataInIO context request+addDataFromRequest ::+  MonadIO m =>+  InstanaContext ->+  Wai.Request ->+  Bool ->+  m a ->+  m a+addDataFromRequest context request synthetic originalIO =+  originalIO >>= addHttpDataInIO context request synthetic  -addHttpDataInIO :: MonadIO m => InstanaContext -> Wai.Request -> a -> m a-addHttpDataInIO context request ioResult = do-  addHttpData context request+addHttpDataInIO ::+  MonadIO m =>+  InstanaContext ->+  Wai.Request ->+  Bool ->+  a ->+  m a+addHttpDataInIO context request synthetic ioResult = do+  addHttpData context request synthetic   return ioResult  -addHttpData :: MonadIO m => InstanaContext -> Wai.Request -> m ()-addHttpData context request = do+addHttpData :: MonadIO m => InstanaContext -> Wai.Request -> Bool -> m ()+addHttpData context request synthetic = do   let     host :: String     host =@@ -372,6 +393,7 @@         ]       ]     )+  setSynthetic context synthetic   addCorrelationTypeAndIdToSpan ::@@ -449,6 +471,7 @@             , RootEntry.timestamp       = timestamp             , RootEntry.errorCount      = 0             , RootEntry.serviceName     = Nothing+            , RootEntry.synthetic       = False             , RootEntry.correlationType = Nothing             , RootEntry.correlationId   = Nothing             , RootEntry.spanData        = SpanType.initialData EntryKind spanType@@ -490,6 +513,7 @@             , NonRootEntry.timestamp   = timestamp             , NonRootEntry.errorCount  = 0             , NonRootEntry.serviceName = Nothing+            , NonRootEntry.synthetic   = False             , NonRootEntry.spanData    = SpanType.initialData EntryKind spanType             }     pushSpan@@ -521,16 +545,25 @@     tracingHeaders = readHttpTracingHeaders request     traceId = TracingHeaders.traceId tracingHeaders     spanId = TracingHeaders.spanId tracingHeaders+    synthetic = TracingHeaders.synthetic tracingHeaders     level = TracingHeaders.level tracingHeaders+    -- ignore incoming X-INSTANA-T/-S if eum correlation data is present+    (traceId', spanId') =+      case TracingHeaders.correlationId tracingHeaders of+        Nothing ->+          (traceId, spanId)+        Just _ ->+          (Nothing, Nothing)+   case level of     TracingHeaders.Trace ->-      case (traceId, spanId) of+      case (traceId', spanId') of         (Just t, Just s) -> do           startEntry context t s spanType-          addHttpData context request+          addHttpData context request synthetic         _                -> do           startRootEntry context spanType-          addHttpData context request+          addHttpData context request synthetic           addCorrelationTypeAndIdToSpan context tracingHeaders $ return ()      TracingHeaders.Suppress -> do@@ -562,9 +595,9 @@ -- capture incoming HTTP requests with 'withHttpEntry', which does -- both of these things automatically. ----- Clients should make sure to call this in the context povided above, that is,--- within 'withHttpEntry_ or between 'startHttpEntry' and 'completeHttpEntry'--- but outside of blocks that create create an exit span, that is, outside of+-- Clients should make sure to call this in the context provided above, that is,+-- within 'withHttpEntry_' or between 'startHttpEntry' and 'completeHttpEntry'+-- but outside of blocks that create an exit span, that is, outside of -- 'withExit', 'withHttpExit' and not between 'startExit' and 'completeExit'. postProcessHttpResponse ::   MonadIO m =>@@ -885,6 +918,14 @@     (\span_ -> Span.setCorrelationId correlationId_ span_)  +-- |Set the synthetic flag. This should only be set on entry spans. It will be+-- silently ignored for other types of spans.+setSynthetic :: MonadIO m => InstanaContext -> Bool -> m ()+setSynthetic context synthetic =+  liftIO $ modifyCurrentSpan context+    (\span_ -> Span.setSynthetic synthetic span_)++ -- |Adds additional custom tags to the currently active span. Call this -- between startEntry/startRootEntry/startExit and completeEntry/completeExit or -- inside the IO action given to with withEntry/withExit/withRootEntry.@@ -1000,6 +1041,10 @@       |> (<$>) BSC8.unpack     (level, correlationType, correlationId) =       TracingHeaders.parseXInstanaL xInstanaLValue+    synthetic =+      headers+      |> List.lookup TracingHeaders.syntheticHeaderName+      |> (<$>) BSC8.unpack   in   TracingHeaders     { TracingHeaders.traceId = traceId@@ -1007,6 +1052,7 @@     , TracingHeaders.level = level     , TracingHeaders.correlationType = correlationType     , TracingHeaders.correlationId = correlationId+    , TracingHeaders.synthetic = synthetic == (Just "1")     }  
src/Instana/SDK/Span/EntrySpan.hs view
@@ -15,9 +15,11 @@   , setCorrelationId   , setCorrelationType   , setServiceName+  , setSynthetic   , spanData   , spanId   , spanName+  , synthetic   , timestamp   , traceId   ) where@@ -153,6 +155,25 @@       RootEntrySpan $ RootEntry.setCorrelationId correlationId_ entry     NonRootEntrySpan _ ->       entrySpan+++-- |The synthetic flag.+synthetic :: EntrySpan -> Bool+synthetic entrySpan =+  case entrySpan of+    RootEntrySpan entry    -> RootEntry.synthetic entry+    NonRootEntrySpan entry -> NonRootEntry.synthetic entry+++-- |Set the synthetic flag. This should only be set on entry spans. It will be+-- silently ignored for other types of spans.+setSynthetic :: Bool -> EntrySpan -> EntrySpan+setSynthetic synthetic_ entrySpan =+  case entrySpan of+    RootEntrySpan entry ->+      RootEntrySpan $ RootEntry.setSynthetic synthetic_ entry+    NonRootEntrySpan entry ->+      NonRootEntrySpan $ NonRootEntry.setSynthetic synthetic_ entry   -- |Optional additional span data.
src/Instana/SDK/Span/NonRootEntry.hs view
@@ -8,6 +8,7 @@   , addData   , addToErrorCount   , setServiceName+  , setSynthetic   ) where  @@ -39,6 +40,8 @@     , errorCount  :: Int       -- |An attribute for overriding the name of the service in Instana     , serviceName :: Maybe Text+      -- |A flag indicating that this span represents a synthetic call+    , synthetic   :: Bool       -- |Additional data for the span. Must be provided as an       -- 'Data.Aeson.Value'.     , spanData    :: Value@@ -58,6 +61,12 @@ setServiceName :: Text -> NonRootEntry -> NonRootEntry setServiceName serviceName_ nonRootEntry =   nonRootEntry { serviceName = Just serviceName_ }+++-- |Set the synthetic flag.+setSynthetic :: Bool -> NonRootEntry -> NonRootEntry+setSynthetic synthetic_ nonRootEntry =+  nonRootEntry { synthetic = synthetic_ }   -- |Add a value to the span's data section.
src/Instana/SDK/Span/RootEntry.hs view
@@ -12,6 +12,7 @@   , setServiceName   , setCorrelationType   , setCorrelationId+  , setSynthetic   ) where  @@ -39,6 +40,8 @@     , errorCount      :: Int       -- |An attribute for overriding the name of the service in Instana     , serviceName     :: Maybe Text+      -- |A flag indicating that this span represents a synthetic call+    , synthetic       :: Bool       -- |The website monitoring correlation type     , correlationType :: Maybe Text       -- |The website monitoring correlation ID@@ -72,6 +75,12 @@ setServiceName :: Text -> RootEntry -> RootEntry setServiceName serviceName_ rootEntry =   rootEntry { serviceName = Just serviceName_ }+++-- |Set the synthetic flag.+setSynthetic :: Bool -> RootEntry -> RootEntry+setSynthetic synthetic_ rootEntry =+  rootEntry { synthetic = synthetic_ }   -- |Set the website monitoring correlation type.
src/Instana/SDK/Span/Span.hs view
@@ -20,10 +20,12 @@   , setCorrelationId   , setCorrelationType   , setServiceName+  , setSynthetic   , spanData   , spanId   , spanKind   , spanName+  , synthetic   , timestamp   , traceId   ) where@@ -179,6 +181,25 @@   case span_ of     Entry entry ->       Entry $ EntrySpan.setCorrelationId correlationId_ entry+    Exit _ ->+      span_+++-- |The synthetic flag.+synthetic :: Span -> Bool+synthetic span_ =+  case span_ of+    Entry entry -> EntrySpan.synthetic entry+    Exit _      -> False+++-- |Set the synthetic flag. This should only be set on entry spans. It will be+-- silently ignored for other types of spans.+setSynthetic :: Bool -> Span -> Span+setSynthetic synthetic_ span_ =+  case span_ of+    Entry entry ->+      Entry $ EntrySpan.setSynthetic synthetic_ entry     Exit _ ->       span_ 
src/Instana/SDK/TracingHeaders.hs view
@@ -11,6 +11,7 @@   , parseXInstanaL   , spanIdHeaderName   , stringToTracingLevel+  , syntheticHeaderName   , traceIdHeaderName   , tracingLevelToString   ) where@@ -36,6 +37,11 @@ levelHeaderName = "X-INSTANA-L"  +-- |X-INSTANA-SYNTHETIC+syntheticHeaderName :: HTTPHeader.HeaderName+syntheticHeaderName = "X-INSTANA-SYNTHETIC"++ -- |Tracing level. data TracingLevel =     -- |Record calls.@@ -106,5 +112,7 @@     , correlationType :: Maybe String       -- |eum correlation ID     , correlationId   :: Maybe String+      -- |synthetic flag+    , synthetic       :: Bool     } deriving (Eq, Generic, Show) 
test/integration/Instana/SDK/IntegrationTest/HttpTracing.hs view
@@ -2,11 +2,15 @@ module Instana.SDK.IntegrationTest.HttpTracing   ( shouldCreateRootEntryWithBracketApi   , shouldAddWebsiteMonitoringCorrelationWithBracketApi+  , shouldIgnoreTraceIdParentIdIfWebsiteMonitoringCorrelationIsPresentWithBracketApi   , shouldCreateNonRootEntryWithBracketApi+  , shouldSetSpanSyWithBracketApi   , shouldSuppressWithBracketApi   , shouldCreateRootEntryWithLowLevelApi   , shouldAddWebsiteMonitoringCorrelationWithLowLevelApi+  , shouldIgnoreTraceIdParentIdIfWebsiteMonitoringCorrelationIsPresentWithLowLevelApi   , shouldCreateNonRootEntryWithLowLevelApi+  , shouldSetSpanSyWithLowLevelApi   , shouldSuppressWithLowLevelApi   ) where @@ -21,9 +25,9 @@ import           Data.Maybe                             (isNothing, listToMaybe) import           Instana.SDK.AgentStub.TraceRequest     (From (..), Span) import qualified Instana.SDK.AgentStub.TraceRequest     as TraceRequest-import qualified Instana.SDK.IntegrationTest.HttpHelper as HttpHelper-import           Instana.SDK.IntegrationTest.HUnitExtra (applyLabel, applyLabel,+import           Instana.SDK.IntegrationTest.HUnitExtra (applyLabel,                                                          assertAllIO, failIO)+import qualified Instana.SDK.IntegrationTest.HttpHelper as HttpHelper import qualified Instana.SDK.IntegrationTest.Suite      as Suite import qualified Instana.SDK.IntegrationTest.TestHelper as TestHelper import qualified Network.HTTP.Client                    as HTTP@@ -38,7 +42,7 @@     runBracketTest       pid       []-      (applyConcat [rootEntryAsserts, bracketAsserts])+      (applyConcat [rootEntryAsserts, bracketAsserts, notSyntheticAssert])   shouldAddWebsiteMonitoringCorrelationWithBracketApi :: String -> IO Test@@ -47,9 +51,31 @@     runBracketTest       pid       [("X-INSTANA-L", "1,correlationType=web;correlationId=1234567890abcdef")]-      (applyConcat [rootEntryAsserts, bracketAsserts, correlationAsserts])+      (applyConcat [+          rootEntryAsserts+        , bracketAsserts+        , correlationAsserts+        , notSyntheticAssert+      ])  +shouldIgnoreTraceIdParentIdIfWebsiteMonitoringCorrelationIsPresentWithBracketApi :: String -> IO Test+shouldIgnoreTraceIdParentIdIfWebsiteMonitoringCorrelationIsPresentWithBracketApi pid =+  applyLabel "shouldIgnoreTraceIdParentIdIfWebsiteMonitoringCorrelationIsPresentWithBracketApi" $+    runBracketTest+      pid+      [ ("X-INSTANA-T", "test-trace-id")+      , ("X-INSTANA-S", "test-span-id")+      , ("X-INSTANA-L", "1,correlationType=web;correlationId=1234567890abcdef")+      ]+      (applyConcat [+          rootEntryAsserts+        , bracketAsserts+        , correlationAsserts+        , notSyntheticAssert+      ])++ shouldCreateNonRootEntryWithBracketApi :: String -> IO Test shouldCreateNonRootEntryWithBracketApi pid =   applyLabel "shouldCreateNonRootEntryWithBracketApi" $ do@@ -58,9 +84,21 @@       [ ("X-INSTANA-T", "test-trace-id")       , ("X-INSTANA-S", "test-span-id")       ]-      (applyConcat [nonRootEntryAsserts, bracketAsserts])+      (applyConcat [nonRootEntryAsserts, bracketAsserts, notSyntheticAssert])  +shouldSetSpanSyWithBracketApi :: String -> IO Test+shouldSetSpanSyWithBracketApi pid =+  applyLabel "shouldSetSpanSyWithBracketApi" $ do+    runBracketTest+      pid+      [ ("X-INSTANA-T", "test-trace-id")+      , ("X-INSTANA-S", "test-span-id")+      , ("X-INSTANA-SYNTHETIC", "1")+      ]+      (applyConcat [nonRootEntryAsserts, bracketAsserts, syntheticAssert])++ shouldSuppressWithBracketApi :: IO Test shouldSuppressWithBracketApi =   applyLabel "shouldSuppressWithBracketApi" $ do@@ -73,7 +111,11 @@     runLowLevelTest       pid       []-      (applyConcat [rootEntryAsserts, lowLevelAsserts])+      (applyConcat [+          rootEntryAsserts+        , lowLevelAsserts+        , notSyntheticAssert+      ])   shouldAddWebsiteMonitoringCorrelationWithLowLevelApi :: String -> IO Test@@ -82,9 +124,21 @@     runLowLevelTest       pid       [("X-INSTANA-L", "1,correlationType=web;correlationId=1234567890abcdef")]-      (applyConcat [rootEntryAsserts, lowLevelAsserts, correlationAsserts])+      (applyConcat [rootEntryAsserts, lowLevelAsserts, correlationAsserts, notSyntheticAssert])  +shouldIgnoreTraceIdParentIdIfWebsiteMonitoringCorrelationIsPresentWithLowLevelApi :: String -> IO Test+shouldIgnoreTraceIdParentIdIfWebsiteMonitoringCorrelationIsPresentWithLowLevelApi pid =+  applyLabel "shouldIgnoreTraceIdParentIdIfWebsiteMonitoringCorrelationIsPresentWithLowLevelApi" $+    runLowLevelTest+      pid+      [ ("X-INSTANA-T", "test-trace-id")+      , ("X-INSTANA-S", "test-span-id")+      , ("X-INSTANA-L", "1,correlationType=web;correlationId=1234567890abcdef")+      ]+      (applyConcat [rootEntryAsserts, lowLevelAsserts, correlationAsserts, notSyntheticAssert])++ shouldCreateNonRootEntryWithLowLevelApi :: String -> IO Test shouldCreateNonRootEntryWithLowLevelApi pid =   applyLabel "shouldCreateNonRootEntryWithLowLevelApi" $ do@@ -93,9 +147,25 @@       [ ("X-INSTANA-T", "test-trace-id")       , ("X-INSTANA-S", "test-span-id")       ]-      (applyConcat [nonRootEntryAsserts, lowLevelAsserts])+      (applyConcat [+          nonRootEntryAsserts+        , lowLevelAsserts+        , notSyntheticAssert+      ])  +shouldSetSpanSyWithLowLevelApi :: String -> IO Test+shouldSetSpanSyWithLowLevelApi pid =+  applyLabel "shouldSetSpanSyWithLowLevelApi" $ do+    runLowLevelTest+      pid+      [ ("X-INSTANA-T", "test-trace-id")+      , ("X-INSTANA-S", "test-span-id")+      , ("X-INSTANA-SYNTHETIC", "1")+      ]+      (applyConcat [nonRootEntryAsserts, lowLevelAsserts, syntheticAssert])++ shouldSuppressWithLowLevelApi :: IO Test shouldSuppressWithLowLevelApi =   applyLabel "shouldSuppressWithLowLevelApi" $ do@@ -312,6 +382,18 @@       ]     )     (TraceRequest.spanData entrySpan)+  ]+++syntheticAssert :: Span -> [Assertion]+syntheticAssert span_ =+  [ assertEqual "span.sy" (Just True) (TraceRequest.sy span_)+  ]+++notSyntheticAssert :: Span -> [Assertion]+notSyntheticAssert span_ =+  [ assertEqual "span.sy" Nothing (TraceRequest.sy span_)   ]  
test/integration/Instana/SDK/IntegrationTest/Metrics.hs view
@@ -51,7 +51,7 @@               (EntityDataRequest.arguments entityData)           , assertLabelIs               "sensorVersion"-              "0.6.1.0"+              "0.6.2.0"               (EntityDataRequest.sensorVersion entityData)           , assertCounterSatisfies               "startTime"
test/integration/Instana/SDK/IntegrationTest/TestSuites.hs view
@@ -124,12 +124,16 @@       { Suite.label = "HTTP Tracing"       , Suite.tests = (\pid -> [           HttpTracing.shouldCreateRootEntryWithBracketApi pid-        , HttpTracing.shouldCreateNonRootEntryWithBracketApi pid         , HttpTracing.shouldAddWebsiteMonitoringCorrelationWithBracketApi pid+        , HttpTracing.shouldIgnoreTraceIdParentIdIfWebsiteMonitoringCorrelationIsPresentWithBracketApi pid+        , HttpTracing.shouldCreateNonRootEntryWithBracketApi pid+        , HttpTracing.shouldSetSpanSyWithBracketApi pid         , HttpTracing.shouldSuppressWithBracketApi         , HttpTracing.shouldCreateRootEntryWithLowLevelApi pid         , HttpTracing.shouldAddWebsiteMonitoringCorrelationWithLowLevelApi pid+        , HttpTracing.shouldIgnoreTraceIdParentIdIfWebsiteMonitoringCorrelationIsPresentWithLowLevelApi pid         , HttpTracing.shouldCreateNonRootEntryWithLowLevelApi pid+        , HttpTracing.shouldSetSpanSyWithLowLevelApi pid         , HttpTracing.shouldSuppressWithLowLevelApi         ])       , Suite.options = Suite.defaultOptions {
test/shared/Instana/SDK/AgentStub/TraceRequest.hs view
@@ -5,7 +5,7 @@   import           Data.Aeson          (FromJSON, ToJSON, Value (Object), (.:),-                                      (.=))+                                      (.:?), (.=)) import qualified Data.Aeson          as Aeson import qualified Data.HashMap.Strict as HM import           Data.Text           (Text)@@ -49,6 +49,7 @@     , ec       :: Int          -- errorCount     , crtp     :: Maybe String -- correlation type     , crid     :: Maybe String -- correlation id+    , sy       :: Maybe Bool   -- synthetic     , spanData :: Aeson.Value  -- spanData     , f        :: Maybe From   -- from     } deriving (Eq, Show, Generic)@@ -58,18 +59,19 @@   parseJSON = Aeson.withObject "span" $     \decodedObject ->       Span-        <$> decodedObject .: "t"-        <*> decodedObject .: "s"-        <*> decodedObject .: "p"-        <*> decodedObject .: "n"-        <*> decodedObject .: "ts"-        <*> decodedObject .: "d"-        <*> decodedObject .: "k"-        <*> decodedObject .: "ec"-        <*> decodedObject .: "crtp"-        <*> decodedObject .: "crid"-        <*> decodedObject .: "data"-        <*> decodedObject .: "f"+        <$> decodedObject .:  "t"+        <*> decodedObject .:  "s"+        <*> decodedObject .:  "p"+        <*> decodedObject .:  "n"+        <*> decodedObject .:  "ts"+        <*> decodedObject .:  "d"+        <*> decodedObject .:  "k"+        <*> decodedObject .:  "ec"+        <*> decodedObject .:  "crtp"+        <*> decodedObject .:  "crid"+        <*> decodedObject .:? "sy"+        <*> decodedObject .:  "data"+        <*> decodedObject .:  "f"   instance ToJSON Span where@@ -84,6 +86,7 @@     , "ec"   .= ec sp     , "crtp" .= crtp sp     , "crid" .= crid sp+    , "sy"   .= sy sp     , "data" .= spanData sp     , "f"    .= f sp     ]
test/unit/Instana/SDK/Internal/SpanStackTest.hs view
@@ -395,6 +395,7 @@       , RootEntry.timestamp       = 1514761200000       , RootEntry.errorCount      = 0       , RootEntry.serviceName     = Nothing+      , RootEntry.synthetic       = False       , RootEntry.correlationType = Nothing       , RootEntry.correlationId   = Nothing       , RootEntry.spanData        = emptyValue
test/unit/Instana/SDK/Internal/SpanTest.hs view
@@ -268,6 +268,7 @@         , RootEntry.timestamp       = 1514761200000         , RootEntry.errorCount      = 0         , RootEntry.serviceName     = Nothing+        , RootEntry.synthetic       = False         , RootEntry.correlationType = Nothing         , RootEntry.correlationId   = Nothing         , RootEntry.spanData        = initialData
test/unit/Instana/SDK/TracingHeadersTest.hs view
@@ -126,4 +126,3 @@     assertEqual "correlation type" (Just "web") correlationType     assertEqual "correlation ID" (Just "1234567890abcdef") correlationId -