Skip to content

Commit

Permalink
Fixed missing "do" notation and removed unnecessary imports
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlauer1 committed May 16, 2024
1 parent 178e3b8 commit b4bff14
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import qualified Data.ByteString.Char8 as B
import Data.CaseInsensitive (foldedCase)
import qualified Data.HashMap.Strict as H
import Data.Maybe
import Data.Maybe (mapMaybe)
import qualified Data.Maybe
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Network.HTTP.Client
Expand Down Expand Up @@ -164,7 +162,7 @@ instrumentResponse conf ctxt resp = do
forM_ (lookupSpan ctxt') $ \s -> do
when (statusCode (responseStatus resp) >= 400) $ do
setStatus s (Error "")
let addStableAttributes =
let addStableAttributes = do
addAttributes
s
[ ("http.response.statusCode", toAttribute $ statusCode $ responseStatus resp)
Expand All @@ -183,7 +181,7 @@ instrumentResponse conf ctxt resp = do
$ mapMaybe
(\h -> (\v -> ("http.response.header." <> T.decodeUtf8 (foldedCase h), toAttribute (T.decodeUtf8 v))) <$> lookup h (responseHeaders resp))
$ responseHeadersToRecord conf
addOldAttributes =
addOldAttributes = do
addAttributes
s
[ ("http.status_code", toAttribute $ statusCode $ responseStatus resp)
Expand Down

0 comments on commit b4bff14

Please sign in to comment.