View Source Peep.Options (peep v3.4.2)

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 (map/0) - Additional tags published with every metric. Global tags are overriden by the tags specified in the metric definition. The default value is %{}.

  • :storage - Which storage implementation to use. :default uses a single ETS table, with some optimizations for concurrent writing. :striped uses one ETS table per scheduler thread, which trades memory for less lock contention for concurrent writes. The default value is :default.

Summary

Types

@type t() :: %Peep.Options{
  global_tags: term(),
  metrics: term(),
  name: term(),
  statsd: term(),
  storage: term()
}

Functions

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