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

Hasura.Tracing.Sampling

Synopsis

Documentation

data SamplingState Source #

B3 propagation sampling state.

Debug sampling state not represented.

samplingStateToHeader :: IsString s => SamplingState -> Maybe s Source #

Convert a sampling state to a value for the X-B3-Sampled header. A return value of Nothing indicates that the header should not be set.

samplingStateFromHeader :: (IsString s, Eq s) => Maybe s -> SamplingState Source #

Convert a X-B3-Sampled header value to a sampling state. An input of Nothing indicates that the header was not set.

data SamplingDecision Source #

A local decision about whether or not to sample spans.

Constructors

SampleNever 
SampleAlways 

type SamplingPolicy = IO SamplingDecision Source #

An IO action for deciding whether or not to sample a trace.

Currently restricted to deny access to the B3 sampling state, but we may want to be more flexible in the future.