nri-observability-0.1.1.0: Report log spans collected by nri-prelude.
Safe HaskellNone
LanguageHaskell2010

Reporter.Honeycomb

Description

This reporter logs execution to https://honeycomb.io.

Synopsis

Documentation

report :: Handler -> Text -> TracingSpan -> IO () Source #

Report a tracing span to Honeycomb.

handler :: Settings -> IO Handler Source #

Create a Handler for a specified set of Settings. Do this once when your application starts and reuse the Handler you get.

data Handler Source #

Contextual information this reporter needs to do its work. You can create one using handler.

data Settings Source #

Configuration settings for ths reporter. A value of this type can be read from the environment using the decoder function.

Constructors

Settings 

Fields

  • apiKey :: Secret ByteString

    The Honeycomb API key to use.

  • datasetName :: Text

    The name of the honeycomb dataset to report to. If the dataset does not exist yet, Honeycomb will create it when you first send a request for it.

    environment variable
    HONEYCOMB_API_KEY
    default value
    *****
  • serviceName :: Text

    The name of the service we're reporting for.

    environment variable
    HONEYCOMB_SERVICE_NAME
    default value
    service
  • fractionOfSuccessRequestsLogged :: Float

    The fraction of successfull requests that will be reported. If your service receives a lot of requests you might want reduce this to safe cost.

    environment variable
    HONEYCOMB_FRACTION_OF_SUCCESS_REQUESTS_LOGGED
    default value
    1
  • apdexTimeMs :: Int

    The apdex time for this service in ms. Requests handled faster than this time will be sampled according to the HONEYCOMB_FRACTION_OF_SUCCESS_REQUESTS_LOGGED variable. Slower request will have a larger chance to be reported.

    environment variable
    HONEYCOMB_APDEX_TIME_IN_MILLISECONDS
    default value
    100

decoder :: Decoder Settings Source #

Read Settings from environment variables. Default variables will be used in case no environment variable is set for an option.