server: don't propogate tracecontext and userinfo for GraphQL queries on PG backends

https://github.com/hasura/graphql-engine-mono/pull/2294

GitOrigin-RevId: c4be1c04a676154a233e75b31ff00b689443b933
This commit is contained in:
Sameer Kolhar 2021-09-06 19:59:44 +05:30 committed by hasura-bot
parent dc1ac69dac
commit 3bd7b9049d

View File

@ -62,13 +62,11 @@ runPGQuery
-> Maybe EQ.PreparedSql
-> m (DiffTime, EncJSON)
-- ^ Also return the time spent in the PG query; for telemetry.
runPGQuery reqId query fieldName userInfo logger sourceConfig tx genSql = do
runPGQuery reqId query fieldName _userInfo logger sourceConfig tx genSql = do
-- log the generated SQL and the graphql query
traceCtx <- currentContext
logQueryLog logger $ mkQueryLog query fieldName genSql reqId
withElapsedTime $ trace ("Postgres Query for root field " <>> fieldName) $
Tracing.interpTraceT id $
hoist (runQueryTxWithCtx userInfo traceCtx $ _pscExecCtx sourceConfig) tx
Tracing.interpTraceT id $ hoist (runQueryTx $ _pscExecCtx sourceConfig) tx
runPGMutation
:: ( MonadIO m