mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-11-11 16:27:14 +03:00
server: Fix trace span names for queries and mutations (#5668)
This commit is contained in:
parent
db3492f50b
commit
d210a0df2d
@ -204,7 +204,7 @@ runQueryDB reqId (query, queryParsed) asts _userInfo (tx, genSql) = do
|
||||
-- log the generated SQL and the graphql query
|
||||
E.ExecutionCtx logger _ pgExecCtx _ _ _ _ <- ask
|
||||
logQueryLog logger query (Just genSql) reqId
|
||||
(telemTimeIO, respE) <- withElapsedTime $ runExceptT $ trace "pg" $
|
||||
(telemTimeIO, respE) <- withElapsedTime $ runExceptT $ trace "Query" $
|
||||
Tracing.interpTraceT id $ executeQuery queryParsed asts (Just genSql) pgExecCtx Q.ReadOnly tx
|
||||
(respHdrs,resp) <- liftEither respE
|
||||
let !json = encodeGQResp $ GQSuccess $ encJToLBS resp
|
||||
@ -230,7 +230,7 @@ runMutationDB reqId query userInfo tx = do
|
||||
-- log the graphql query
|
||||
logQueryLog logger query Nothing reqId
|
||||
ctx <- Tracing.currentContext
|
||||
(telemTimeIO, respE) <- withElapsedTime $ runExceptT $ trace "pg" $
|
||||
(telemTimeIO, respE) <- withElapsedTime $ runExceptT $ trace "Mutation" $
|
||||
Tracing.interpTraceT (runLazyTx pgExecCtx Q.ReadWrite . withTraceContext ctx . withUserInfo userInfo) tx
|
||||
resp <- liftEither respE
|
||||
let !json = encodeGQResp $ GQSuccess $ encJToLBS resp
|
||||
|
Loading…
Reference in New Issue
Block a user