summaryrefslogtreecommitdiff
path: root/mini-http-server/Network/HTTP/Server/Mini.hs
diff options
context:
space:
mode:
Diffstat (limited to 'mini-http-server/Network/HTTP/Server/Mini.hs')
-rw-r--r--mini-http-server/Network/HTTP/Server/Mini.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/mini-http-server/Network/HTTP/Server/Mini.hs b/mini-http-server/Network/HTTP/Server/Mini.hs
index 266e958..fb982d7 100644
--- a/mini-http-server/Network/HTTP/Server/Mini.hs
+++ b/mini-http-server/Network/HTTP/Server/Mini.hs
@@ -13,6 +13,7 @@ import Network.Socket
import Network.Socket.ByteString
import Network.HTTP.Server.Mini.Internal.Parser
+import Network.HTTP.Server.Mini.Internal.Instrument
import Network.HTTP.Server.Mini.Printer
import Network.HTTP.Server.Mini.Types
@@ -72,5 +73,5 @@ handleConnection settings conn handler =
readRequest (setMaxRequestSize settings) (recv conn) >>= \case
Nothing -> return ()
Just req -> do
- resp <- handler req
- sendResponse conn resp
+ resp <- instrument "handler" $ handler req
+ instrument "sendResponse" $ sendResponse conn resp