Safe Haskell | None |
---|---|
Language | Haskell2010 |
Zipkin trace publisher.
Synopsis
- data Zipkin
- new :: MonadIO m => Settings -> m Zipkin
- data Settings = Settings {}
- defaultSettings :: Settings
- data Endpoint = Endpoint {
- endpointService :: !(Maybe Text)
- endpointPort :: !(Maybe Int)
- endpointIPv4 :: !(Maybe IPv4)
- endpointIPv6 :: !(Maybe IPv6)
- defaultEndpoint :: Endpoint
- run :: Zipkin -> TraceT m a -> m a
- publish :: MonadIO m => Zipkin -> m ()
- with :: MonadUnliftIO m => Settings -> (Zipkin -> m a) -> m a
- rootSpan :: MonadTrace m => Sampling -> Name -> m a -> m a
- data Sampling
- localSpan :: MonadTrace m => Name -> m a -> m a
- data B3
- clientSpan :: MonadTrace m => Maybe Endpoint -> Name -> (Maybe B3 -> m a) -> m a
- serverSpan :: MonadTrace m => Maybe Endpoint -> B3 -> m a -> m a
- producerSpan :: MonadTrace m => Maybe Endpoint -> Name -> (Maybe B3 -> m a) -> m a
- consumerSpan :: MonadTrace m => Maybe Endpoint -> B3 -> m a -> m a
- tag :: MonadTrace m => Text -> Text -> m ()
- annotate :: MonadTrace m => Text -> m ()
- annotateAt :: MonadTrace m => POSIXTime -> Text -> m ()
Set up the trace collector
Zipkin creating settings.
Settings | |
|
defaultSettings :: Settings Source #
Creates Settings
pointing to a Zikpin server at host "localhost"
and port 9411
, without
background flushing.
Information about a hosted service.
Endpoint | |
|
defaultEndpoint :: Endpoint Source #
An empty endpoint.
run :: Zipkin -> TraceT m a -> m a Source #
Runs a TraceT
action, sampling spans appropriately. Note that this method does not publish
spans on its own; to do so, either call publish
manually or specify a positive
settingsPublishPeriod
to publish in the background.
publish :: MonadIO m => Zipkin -> m () Source #
Flushes all complete spans to the Zipkin server. This method is thread-safe.
with :: MonadUnliftIO m => Settings -> (Zipkin -> m a) -> m a Source #
Convenience method to start a Zipkin
, run an action, and publish all spans before returning.
Record in-process spans
The sampling applied to a trace.
Note that non-sampled traces still yield active spans. However these spans are not published to Zipkin.
Instances
Enum Sampling Source # | |
Eq Sampling Source # | |
Ord Sampling Source # | |
Defined in Monitor.Tracing.Zipkin | |
Show Sampling Source # | |
localSpan :: MonadTrace m => Name -> m a -> m a Source #
Continues an existing trace if present, otherwise does nothing.
Record cross-process spans
Exportable trace information, used for cross-process traces.
clientSpan :: MonadTrace m => Maybe Endpoint -> Name -> (Maybe B3 -> m a) -> m a Source #
serverSpan :: MonadTrace m => Maybe Endpoint -> B3 -> m a -> m a Source #
producerSpan :: MonadTrace m => Maybe Endpoint -> Name -> (Maybe B3 -> m a) -> m a Source #
consumerSpan :: MonadTrace m => Maybe Endpoint -> B3 -> m a -> m a Source #
Add metadata
annotate :: MonadTrace m => Text -> m () Source #
Annotates the active span using the current time.
annotateAt :: MonadTrace m => POSIXTime -> Text -> m () Source #
Annotates the active span at the given time.