graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.Tracing.Monad

Synopsis

Documentation

newtype TraceT m a Source #

TraceT is the standard implementation of MonadTrace. Via a Reader, it keeps track of the default policy and reporter to use thoughout the stack, as well as the current trace.

Constructors

TraceT (ReaderT (Reporter, Maybe TraceEnv) m a) 

Instances

Instances details
MonadTrans TraceT Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

lift :: Monad m => m a -> TraceT m a #

TableCoreInfoRM b m => TableCoreInfoRM b (TraceT m) Source # 
Instance details

Defined in Hasura.RQL.Types.SchemaCache

TableInfoRM b m => TableInfoRM b (TraceT m) Source # 
Instance details

Defined in Hasura.RQL.Types.SchemaCache

MonadBaseControl b m => MonadBaseControl b (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Associated Types

type StM (TraceT m) a Source #

Methods

liftBaseWith :: (RunInBase (TraceT m) b -> b a) -> TraceT m a Source #

restoreM :: StM (TraceT m) a -> TraceT m a Source #

MonadError e m => MonadError e (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

throwError :: e -> TraceT m a #

catchError :: TraceT m a -> (e -> TraceT m a) -> TraceT m a #

MonadReader r m => MonadReader r (TraceT m) Source #

Hides the fact that TraceT is a reader to the rest of the stack.

Instance details

Defined in Hasura.Tracing.Monad

Methods

ask :: TraceT m r #

local :: (r -> r) -> TraceT m a -> TraceT m a #

reader :: (r -> a) -> TraceT m a #

MonadState s m => MonadState s (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

get :: TraceT m s #

put :: s -> TraceT m () #

state :: (s -> (a, s)) -> TraceT m a #

MonadBase b m => MonadBase b (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

liftBase :: b α -> TraceT m α Source #

MonadFix m => MonadFix (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

mfix :: (a -> TraceT m a) -> TraceT m a #

MonadIO m => MonadIO (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

liftIO :: IO a -> TraceT m a #

Applicative m => Applicative (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

pure :: a -> TraceT m a #

(<*>) :: TraceT m (a -> b) -> TraceT m a -> TraceT m b #

liftA2 :: (a -> b -> c) -> TraceT m a -> TraceT m b -> TraceT m c #

(*>) :: TraceT m a -> TraceT m b -> TraceT m b #

(<*) :: TraceT m a -> TraceT m b -> TraceT m a #

Functor m => Functor (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

fmap :: (a -> b) -> TraceT m a -> TraceT m b #

(<$) :: a -> TraceT m b -> TraceT m a #

Monad m => Monad (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

(>>=) :: TraceT m a -> (a -> TraceT m b) -> TraceT m b #

(>>) :: TraceT m a -> TraceT m b -> TraceT m b #

return :: a -> TraceT m a #

MonadCatch m => MonadCatch (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

catch :: Exception e => TraceT m a -> (e -> TraceT m a) -> TraceT m a #

MonadMask m => MonadMask (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

mask :: ((forall a. TraceT m a -> TraceT m a) -> TraceT m b) -> TraceT m b #

uninterruptibleMask :: ((forall a. TraceT m a -> TraceT m a) -> TraceT m b) -> TraceT m b #

generalBracket :: TraceT m a -> (a -> ExitCase b -> TraceT m c) -> (a -> TraceT m b) -> TraceT m (b, c) #

MonadThrow m => MonadThrow (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

Methods

throwM :: Exception e => e -> TraceT m a #

MonadTx m => MonadTx (TraceT m) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Connection.MonadTx

Methods

liftTx :: TxE QErr a -> TraceT m a Source #

MonadGQLExecutionCheck m => MonadGQLExecutionCheck (TraceT m) Source # 
Instance details

Defined in Hasura.GraphQL.Execute.Common

MonadExecutionLog m => MonadExecutionLog (TraceT m) Source # 
Instance details

Defined in Hasura.GraphQL.Logging.ExecutionLog

MonadQueryLog m => MonadQueryLog (TraceT m) Source # 
Instance details

Defined in Hasura.GraphQL.Logging.QueryLog

MonadEventLogCleanup m => MonadEventLogCleanup (TraceT m) Source # 
Instance details

Defined in Hasura.RQL.DDL.EventTrigger

MetadataM m => MetadataM (TraceT m) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata

CacheRM m => CacheRM (TraceT m) Source # 
Instance details

Defined in Hasura.RQL.Types.SchemaCache

CacheRWM m => CacheRWM (TraceT m) Source # 
Instance details

Defined in Hasura.RQL.Types.SchemaCache.Build

UserInfoM m => UserInfoM (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

MonadResolveSource m => MonadResolveSource (TraceT m) Source # 
Instance details

Defined in Hasura.RQL.Types.Source

ConsoleRenderer m => ConsoleRenderer (TraceT m) Source # 
Instance details

Defined in Hasura.Server.App

Associated Types

type ConsoleType (TraceT m) Source #

MonadMetadataApiAuthorization m => MonadMetadataApiAuthorization (TraceT m) Source # 
Instance details

Defined in Hasura.Server.App

HasResourceLimits m => HasResourceLimits (TraceT m) Source # 
Instance details

Defined in Hasura.Server.Limits

HttpLog m => HttpLog (TraceT m) Source # 
Instance details

Defined in Hasura.Server.Logging

Associated Types

type ExtraHttpLogMetadata (TraceT m) Source #

MonadGetPolicies m => MonadGetPolicies (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

ProvidesNetwork m => ProvidesNetwork (TraceT m) Source # 
Instance details

Defined in Hasura.Services.Network

(MonadIO m, MonadBaseControl IO m) => MonadTrace (TraceT m) Source # 
Instance details

Defined in Hasura.Tracing.Monad

type ConsoleType (TraceT m) Source # 
Instance details

Defined in Hasura.Server.App

type ExtraHttpLogMetadata (TraceT m) Source # 
Instance details

Defined in Hasura.Server.Logging

type StM (TraceT m) a Source # 
Instance details

Defined in Hasura.Tracing.Monad

type StM (TraceT m) a

runTraceT :: Reporter -> TraceT m a -> m a Source #

Runs the TraceT monad, by providing the default reporter. This does NOT start a trace.

TODO: we could change this to always start a trace with a default name? This would allow us to guarantee that there is always a current trace, but this might not always be the correct behaviour: in practice, we would end up generating one that spans the entire lifetime of the engine if runTraceT were to be used from main.

ignoreTraceT :: TraceT m a -> m a Source #

Run the TraceT monad, but without actually tracing anything: no report will be emitted, even if calls to newTraceWith force the trace to be sampled.