Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
OTel.SDK.Trace.Internal
Contents
Synopsis
- data TracerProviderSpec = TracerProviderSpec {
- tracerProviderSpecNow :: IO Timestamp
- tracerProviderSpecLogger :: Logger
- tracerProviderSpecSeed :: Seed
- tracerProviderSpecIdGenerator :: forall a. Logger -> (IdGeneratorSpec -> IO a) -> IO a
- tracerProviderSpecSpanProcessors :: forall a. [Logger -> (SpanProcessorSpec -> IO a) -> IO a]
- tracerProviderSpecSampler :: forall a. Logger -> (SamplerSpec -> IO a) -> IO a
- tracerProviderSpecResource :: Resource Attrs
- tracerProviderSpecSpanAttrsLimits :: AttrsLimits 'AttrsForSpan
- tracerProviderSpecSpanEventAttrsLimits :: AttrsLimits 'AttrsForSpanEvent
- tracerProviderSpecSpanLinkAttrsLimits :: AttrsLimits 'AttrsForSpanLink
- tracerProviderSpecCallStackAttrs :: CallStack -> AttrsBuilder 'AttrsForSpan
- tracerProviderSpecSpanContextMeta :: SpanContext -> [Pair]
- defaultTracerProviderSpec :: TracerProviderSpec
- withTracerProvider :: forall m a. MonadUnliftIO m => TracerProviderSpec -> (TracerProvider -> m a) -> m a
- withTracerProviderIO :: forall a. TracerProviderSpec -> (TracerProvider -> IO a) -> IO a
- data SpanProcessor = SpanProcessor {
- spanProcessorOnSpanStart :: Context -> (UpdateSpanSpec -> IO (Span Attrs)) -> IO ()
- spanProcessorOnSpanEnd :: Span Attrs -> IO ()
- spanProcessorShutdown :: IO ()
- spanProcessorForceFlush :: IO ()
- buildSpanProcessor :: forall a. Resource Attrs -> Logger -> SpanProcessorSpec -> (SpanProcessor -> IO a) -> IO a
- data SimpleSpanProcessorSpec = SimpleSpanProcessorSpec {
- simpleSpanProcessorSpecName :: Text
- simpleSpanProcessorSpecExporter :: forall a. Logger -> (SpanExporterSpec -> IO a) -> IO a
- simpleSpanProcessorSpecOnSpansExported :: OnSpansExported ()
- defaultSimpleSpanProcessorSpec :: SimpleSpanProcessorSpec
- simpleSpanProcessor :: forall a. SimpleSpanProcessorSpec -> Logger -> (SpanProcessorSpec -> IO a) -> IO a
- data SpanProcessorSpec = SpanProcessorSpec {
- spanProcessorSpecName :: Text
- spanProcessorSpecExporter :: forall a. Logger -> (SpanExporterSpec -> IO a) -> IO a
- spanProcessorSpecOnSpanStart :: Context -> (UpdateSpanSpec -> SpanProcessorM (Span Attrs)) -> SpanProcessorM ()
- spanProcessorSpecOnSpanEnd :: Span Attrs -> SpanProcessorM ()
- spanProcessorSpecShutdown :: SpanProcessorM ()
- spanProcessorSpecShutdownTimeout :: Int
- spanProcessorSpecForceFlush :: SpanProcessorM ()
- spanProcessorSpecForceFlushTimeout :: Int
- spanProcessorSpecOnTimeout :: OnTimeout ()
- spanProcessorSpecOnException :: OnException ()
- defaultSpanProcessorSpec :: SpanProcessorSpec
- data SpanExportResult
- data SpanExporter = SpanExporter {
- spanExporterExport :: Batch (Span Attrs) -> (SpanExportResult -> IO ()) -> IO ()
- spanExporterShutdown :: IO ()
- spanExporterForceFlush :: IO ()
- buildSpanExporter :: Resource Attrs -> Logger -> SpanExporterSpec -> IO SpanExporter
- data OTLPSpanExporterSpec = OTLPSpanExporterSpec {
- otlpSpanExporterSpecManager :: Manager
- otlpSpanExporterSpecEndpoint :: URI
- otlpSpanExporterSpecTimeout :: Int
- otlpSpanExporterSpecProtocol :: OTLPProtocol
- otlpSpanExporterSpecHeaders :: [Header]
- otlpSpanExporterSpecRedactedRequestHeaders :: [HeaderName]
- otlpSpanExporterSpecRedactedResponseHeaders :: [HeaderName]
- otlpSpanExporterSpecWorkerQueueSize :: Int
- otlpSpanExporterSpecWorkerCount :: Int
- otlpSpanExporterSpecRetryPolicy :: RetryPolicyM IO
- defaultOTLPSpanExporterSpec :: OTLPSpanExporterSpec
- otlpSpanExporter :: forall a. OTLPSpanExporterSpec -> Logger -> (SpanExporterSpec -> IO a) -> IO a
- data OTLPProtocol = OTLPProtocolHTTPProtobuf
- httpProtobufProtocol :: OTLPProtocol
- data OTLPSpanExporterItem = OTLPSpanExporterItem {}
- stmSpanExporter :: forall a. TMQueue (Span Attrs) -> Logger -> (SpanExporterSpec -> IO a) -> IO a
- data SpanExporterSpec = SpanExporterSpec {
- spanExporterSpecName :: Text
- spanExporterSpecExport :: Batch (Span Attrs) -> (SpanExportResult -> IO ()) -> SpanExporterM ()
- spanExporterSpecShutdown :: SpanExporterM ()
- spanExporterSpecShutdownTimeout :: Int
- spanExporterSpecForceFlush :: SpanExporterM ()
- spanExporterSpecForceFlushTimeout :: Int
- spanExporterSpecOnTimeout :: OnTimeout ()
- spanExporterSpecOnException :: OnException ()
- defaultSpanExporterSpec :: SpanExporterSpec
- data Sampler = Sampler {}
- buildSampler :: forall m. MonadIO m => Logger -> SamplerSpec -> m Sampler
- data SamplerSpec = SamplerSpec {}
- defaultSamplerSpec :: SamplerSpec
- alwaysOnSampler :: forall a. Logger -> (SamplerSpec -> IO a) -> IO a
- alwaysOffSampler :: forall a. Logger -> (SamplerSpec -> IO a) -> IO a
- data ParentBasedSamplerSpec = ParentBasedSamplerSpec {
- parentBasedSamplerSpecOnRoot :: forall a. Logger -> (SamplerSpec -> IO a) -> IO a
- parentBasedSamplerSpecOnRemoteParentSampled :: forall a. Logger -> (SamplerSpec -> IO a) -> IO a
- parentBasedSamplerSpecOnRemoteParentNotSampled :: forall a. Logger -> (SamplerSpec -> IO a) -> IO a
- parentBasedSamplerSpecOnLocalParentSampled :: forall a. Logger -> (SamplerSpec -> IO a) -> IO a
- parentBasedSamplerSpecOnLocalParentNotSampled :: forall a. Logger -> (SamplerSpec -> IO a) -> IO a
- defaultParentBasedSamplerSpec :: ParentBasedSamplerSpec
- parentBasedSampler :: forall a. ParentBasedSamplerSpec -> Logger -> (SamplerSpec -> IO a) -> IO a
- constDecisionSampler :: SamplingDecision -> SamplerSpec
- data SamplerInput = SamplerInput {}
- data SamplingResult = SamplingResult {}
- defaultSamplingResult :: SamplingResult
- data SamplingDecision
- samplingDecisionDrop :: SamplingDecision
- samplingDecisionRecordOnly :: SamplingDecision
- samplingDecisionRecordAndSample :: SamplingDecision
- newtype SpanProcessorM a = SpanProcessorM {
- unSpanProcessorM :: SpanExporter -> LoggingT IO a
- askSpanExporter :: SpanProcessorM SpanExporter
- runSpanProcessorM :: SpanExporter -> Logger -> OnTimeout a -> OnException a -> Int -> [SeriesElem] -> SpanProcessorM a -> IO a
- newtype SpanExporterM a = SpanExporterM {
- unSpanExporterM :: Resource Attrs -> LoggingT IO a
- askResource :: SpanExporterM (Resource Attrs)
- runSpanExporterM :: Resource Attrs -> Logger -> OnTimeout a -> OnException a -> Int -> [SeriesElem] -> SpanExporterM a -> IO a
- newtype SamplerM a = SamplerM {
- unSamplerM :: LoggingT IO a
- runSamplerM :: Logger -> OnException a -> [SeriesElem] -> SamplerM a -> IO a
- newtype IdGeneratorM a = IdGeneratorM {
- unIdGeneratorM :: PRNG -> LoggingT IO a
- runIdGeneratorM :: PRNG -> Logger -> IdGeneratorM a -> IO a
- data IdGenerator = IdGenerator {
- idGeneratorGenTraceId :: PRNG -> IO TraceId
- idGeneratorGenSpanId :: PRNG -> IO SpanId
- buildIdGenerator :: forall m. MonadIO m => Logger -> IdGeneratorSpec -> m IdGenerator
- data IdGeneratorSpec = IdGeneratorSpec {}
- defaultIdGeneratorSpec :: IdGeneratorSpec
- newtype PRNG = PRNG {}
- genUniform :: forall a. Variate a => IdGeneratorM a
- newPRNGRef :: Seed -> IO (MVar PRNG)
- newtype OnException a = OnException {
- runOnException :: SomeException -> [SeriesElem] -> LoggingT IO a
- askException :: OnException SomeException
- askExceptionMetadata :: OnException [SeriesElem]
- newtype OnTimeout a = OnTimeout {
- runOnTimeout :: Int -> [SeriesElem] -> LoggingT IO a
- askTimeoutMicros :: OnTimeout Int
- askTimeoutMetadata :: OnTimeout [SeriesElem]
- newtype OnSpansExported a = OnSpansExported {
- runOnSpansExported :: Batch (Span Attrs) -> SpanExportResult -> [SeriesElem] -> LoggingT IO a
- askSpansExported :: OnSpansExported (Batch (Span Attrs))
- askSpansExportedResult :: OnSpansExported SpanExportResult
- askSpansExportedMetadata :: OnSpansExported [SeriesElem]
- newtype Batch a = Batch {
- unBatch :: [a]
- singletonBatch :: a -> Batch a
- fromListBatch :: [a] -> Batch a
- data ConcurrentWorkersSpec item = ConcurrentWorkersSpec {}
- defaultConcurrentWorkersSpec :: ConcurrentWorkersSpec item
- data ConcurrentWorkers item = ConcurrentWorkers {
- concurrentWorkersEnqueueItem :: item -> IO ()
- concurrentWorkersStopWorkers :: IO ()
- withConcurrentWorkers :: forall item a. (ToJSON item, Typeable item) => ConcurrentWorkersSpec item -> (ConcurrentWorkers item -> IO a) -> IO a
- unlessSTM :: Monoid a => STM Bool -> STM (IO a) -> IO a
- withAll :: forall a b. [(a -> b) -> b] -> ([a] -> b) -> b
- defaultSystemSeed :: Seed
- defaultManager :: Manager
- spanSummary :: Span attrs -> Value
- redactHttpExceptionHeaders :: Set HeaderName -> Set HeaderName -> SomeException -> SomeException
Disclaimer
In general, changes to this module will not be reflected in the library's version updates. Direct use of this module should be done with utmost care, otherwise invariants will easily be violated.
data TracerProviderSpec Source #
Constructors
TracerProviderSpec | |
Fields
|
withTracerProvider :: forall m a. MonadUnliftIO m => TracerProviderSpec -> (TracerProvider -> m a) -> m a Source #
withTracerProviderIO :: forall a. TracerProviderSpec -> (TracerProvider -> IO a) -> IO a Source #
data SpanProcessor Source #
Constructors
SpanProcessor | |
Fields
|
Instances
Monoid SpanProcessor Source # | |
Defined in OTel.SDK.Trace.Internal Methods mempty :: SpanProcessor # mappend :: SpanProcessor -> SpanProcessor -> SpanProcessor # mconcat :: [SpanProcessor] -> SpanProcessor # | |
Semigroup SpanProcessor Source # | |
Defined in OTel.SDK.Trace.Internal Methods (<>) :: SpanProcessor -> SpanProcessor -> SpanProcessor # sconcat :: NonEmpty SpanProcessor -> SpanProcessor # stimes :: Integral b => b -> SpanProcessor -> SpanProcessor # |
buildSpanProcessor :: forall a. Resource Attrs -> Logger -> SpanProcessorSpec -> (SpanProcessor -> IO a) -> IO a Source #
data SimpleSpanProcessorSpec Source #
Constructors
SimpleSpanProcessorSpec | |
Fields
|
simpleSpanProcessor :: forall a. SimpleSpanProcessorSpec -> Logger -> (SpanProcessorSpec -> IO a) -> IO a Source #
data SpanProcessorSpec Source #
Constructors
SpanProcessorSpec | |
Fields
|
data SpanExportResult Source #
Constructors
SpanExportResultSuccess | |
SpanExportResultFailure |
Instances
Show SpanExportResult Source # | |
Defined in OTel.SDK.Trace.Internal Methods showsPrec :: Int -> SpanExportResult -> ShowS # show :: SpanExportResult -> String # showList :: [SpanExportResult] -> ShowS # | |
Eq SpanExportResult Source # | |
Defined in OTel.SDK.Trace.Internal Methods (==) :: SpanExportResult -> SpanExportResult -> Bool # (/=) :: SpanExportResult -> SpanExportResult -> Bool # |
data SpanExporter Source #
Constructors
SpanExporter | |
Fields
|
buildSpanExporter :: Resource Attrs -> Logger -> SpanExporterSpec -> IO SpanExporter Source #
data OTLPSpanExporterSpec Source #
Constructors
OTLPSpanExporterSpec | |
Fields
|
otlpSpanExporter :: forall a. OTLPSpanExporterSpec -> Logger -> (SpanExporterSpec -> IO a) -> IO a Source #
data OTLPProtocol Source #
Constructors
OTLPProtocolHTTPProtobuf |
Instances
Show OTLPProtocol Source # | |
Defined in OTel.SDK.Trace.Internal Methods showsPrec :: Int -> OTLPProtocol -> ShowS # show :: OTLPProtocol -> String # showList :: [OTLPProtocol] -> ShowS # | |
Eq OTLPProtocol Source # | |
Defined in OTel.SDK.Trace.Internal |
data OTLPSpanExporterItem Source #
Little ad-hoc helper type for use in otlpSpanExporterIO
.
Constructors
OTLPSpanExporterItem | |
Fields |
Instances
ToJSON OTLPSpanExporterItem Source # | |
Defined in OTel.SDK.Trace.Internal Methods toJSON :: OTLPSpanExporterItem -> Value # toEncoding :: OTLPSpanExporterItem -> Encoding # toJSONList :: [OTLPSpanExporterItem] -> Value # toEncodingList :: [OTLPSpanExporterItem] -> Encoding # omitField :: OTLPSpanExporterItem -> Bool # |
stmSpanExporter :: forall a. TMQueue (Span Attrs) -> Logger -> (SpanExporterSpec -> IO a) -> IO a Source #
data SpanExporterSpec Source #
Constructors
SpanExporterSpec | |
Fields
|
Constructors
Sampler | |
Fields |
buildSampler :: forall m. MonadIO m => Logger -> SamplerSpec -> m Sampler Source #
data SamplerSpec Source #
Constructors
SamplerSpec | |
alwaysOnSampler :: forall a. Logger -> (SamplerSpec -> IO a) -> IO a Source #
alwaysOffSampler :: forall a. Logger -> (SamplerSpec -> IO a) -> IO a Source #
data ParentBasedSamplerSpec Source #
Constructors
ParentBasedSamplerSpec | |
Fields
|
parentBasedSampler :: forall a. ParentBasedSamplerSpec -> Logger -> (SamplerSpec -> IO a) -> IO a Source #
data SamplerInput Source #
data SamplingResult Source #
Constructors
SamplingResult | |
data SamplingDecision Source #
Instances
Show SamplingDecision Source # | |
Defined in OTel.SDK.Trace.Internal Methods showsPrec :: Int -> SamplingDecision -> ShowS # show :: SamplingDecision -> String # showList :: [SamplingDecision] -> ShowS # | |
Eq SamplingDecision Source # | |
Defined in OTel.SDK.Trace.Internal Methods (==) :: SamplingDecision -> SamplingDecision -> Bool # (/=) :: SamplingDecision -> SamplingDecision -> Bool # |
newtype SpanProcessorM a Source #
Constructors
SpanProcessorM | |
Fields
|
Instances
runSpanProcessorM :: SpanExporter -> Logger -> OnTimeout a -> OnException a -> Int -> [SeriesElem] -> SpanProcessorM a -> IO a Source #
newtype SpanExporterM a Source #
Constructors
SpanExporterM | |
Fields
|
Instances
runSpanExporterM :: Resource Attrs -> Logger -> OnTimeout a -> OnException a -> Int -> [SeriesElem] -> SpanExporterM a -> IO a Source #
Constructors
SamplerM | |
Fields
|
Instances
runSamplerM :: Logger -> OnException a -> [SeriesElem] -> SamplerM a -> IO a Source #
newtype IdGeneratorM a Source #
Constructors
IdGeneratorM | |
Fields
|
Instances
runIdGeneratorM :: PRNG -> Logger -> IdGeneratorM a -> IO a Source #
data IdGenerator Source #
Constructors
IdGenerator | |
Fields
|
buildIdGenerator :: forall m. MonadIO m => Logger -> IdGeneratorSpec -> m IdGenerator Source #
data IdGeneratorSpec Source #
Constructors
IdGeneratorSpec | |
genUniform :: forall a. Variate a => IdGeneratorM a Source #
newtype OnException a #
Constructors
OnException | |
Fields
|
Instances
Constructors
OnTimeout | |
Fields
|
Instances
MonadIO OnTimeout | |
Defined in OTel.API.Common.Internal | |
Applicative OnTimeout | |
Defined in OTel.API.Common.Internal | |
Functor OnTimeout | |
Monad OnTimeout | |
MonadCatch OnTimeout | |
Defined in OTel.API.Common.Internal | |
MonadMask OnTimeout | |
Defined in OTel.API.Common.Internal Methods mask :: HasCallStack => ((forall a. OnTimeout a -> OnTimeout a) -> OnTimeout b) -> OnTimeout b # uninterruptibleMask :: HasCallStack => ((forall a. OnTimeout a -> OnTimeout a) -> OnTimeout b) -> OnTimeout b # generalBracket :: HasCallStack => OnTimeout a -> (a -> ExitCase b -> OnTimeout c) -> (a -> OnTimeout b) -> OnTimeout (b, c) # | |
MonadThrow OnTimeout | |
Defined in OTel.API.Common.Internal Methods throwM :: (HasCallStack, Exception e) => e -> OnTimeout a # | |
MonadLogger OnTimeout | |
Defined in OTel.API.Common.Internal | |
MonadLoggerIO OnTimeout | |
Defined in OTel.API.Common.Internal | |
MonadUnliftIO OnTimeout | |
Defined in OTel.API.Common.Internal | |
Monoid a => Monoid (OnTimeout a) | |
Semigroup a => Semigroup (OnTimeout a) | |
newtype OnSpansExported a Source #
Constructors
OnSpansExported | |
Fields
|
Instances
askSpansExported :: OnSpansExported (Batch (Span Attrs)) Source #
Instances
Foldable Batch Source # | |
Defined in OTel.SDK.Trace.Internal Methods fold :: Monoid m => Batch m -> m # foldMap :: Monoid m => (a -> m) -> Batch a -> m # foldMap' :: Monoid m => (a -> m) -> Batch a -> m # foldr :: (a -> b -> b) -> b -> Batch a -> b # foldr' :: (a -> b -> b) -> b -> Batch a -> b # foldl :: (b -> a -> b) -> b -> Batch a -> b # foldl' :: (b -> a -> b) -> b -> Batch a -> b # foldr1 :: (a -> a -> a) -> Batch a -> a # foldl1 :: (a -> a -> a) -> Batch a -> a # elem :: Eq a => a -> Batch a -> Bool # maximum :: Ord a => Batch a -> a # minimum :: Ord a => Batch a -> a # | |
Traversable Batch Source # | |
Applicative Batch Source # | |
Functor Batch Source # | |
Monad Batch Source # | |
ToJSON a => ToJSON (Batch a) Source # | |
Monoid (Batch a) Source # | |
Semigroup (Batch a) Source # | |
Show a => Show (Batch a) Source # | |
Eq a => Eq (Batch a) Source # | |
singletonBatch :: a -> Batch a Source #
fromListBatch :: [a] -> Batch a Source #
data ConcurrentWorkersSpec item Source #
Constructors
ConcurrentWorkersSpec | |
Fields |
data ConcurrentWorkers item Source #
Constructors
ConcurrentWorkers | |
Fields
|
withConcurrentWorkers :: forall item a. (ToJSON item, Typeable item) => ConcurrentWorkersSpec item -> (ConcurrentWorkers item -> IO a) -> IO a Source #
spanSummary :: Span attrs -> Value Source #