View Source Peep.Options (peep v1.0.1)

Options for a Peep reporter. Validated with NimbleOptions.

  • :name (atom/0) - Required. A name for the Peep worker process

  • :metrics (list of term/0) - Required. A list of Telemetry.Metrics metric definitions to be collected and exposed.

  • :statsd - An optional keyword list of statsd configuration.

    • :flush_interval_ms (non_neg_integer/0) - Time interval between StatsD metric emissions. The default value is 5000.

    • :host - Hostname or IP address of the StatsD server. The default value is {127, 0, 0, 1}.

    • :port (non_neg_integer/0) - Port of the StatsD server. The default value is 8125.

    • :socket_path - Path to the Unix Domain Socket used for publishing instead of the hostname and port. Overrides :host and :port configuration if present

    • :formatter - Determines the format of the published metrics. Can be either :standard or :datadog. The default value is :standard.

    • :mtu (non_neg_integer/0) - Determine max size of statsd packets. For UDP, 1472 is a good choice. For UDS, 8192 is probably better. The rationale for these recommendations comes from this guide. The default value is 1472.

  • :global_tags (keyword/0) - Additional tags published with every metric. Global tags are overriden by the tags specified in the metric definition. The default value is [].

  • :distribution_bucket_variability - A percentage reflecting roughly half the amount by which bucket boundaries should vary. For example, with a value of 10%, the bucket after 100 would store values roughly in the range of 101..120, meaning the bucket's midpoint is 110. The bucket after that would store values roughly in the range 120..144, with a midpoint of 131. A smaller value trades memory (:ets table size) for precision. The default value is 0.1.

Link to this section Summary

Link to this section Functions

@spec docs() :: String.t()
@spec validate(Keyword.t()) ::
  {:ok,
   %Peep.Options{
     distribution_bucket_variability: term(),
     global_tags: term(),
     metrics: term(),
     name: term(),
     statsd: term()
   }}
  | {:error, String.t()}