View Source PromEx.MetricTypes.Polling (PromEx v1.11.0)

This struct defines the fields necessary to export a group of pollable metric sources from a plugin.

Summary

Types

t()
  • group_name: A unique identifier for the collection of metrics.
  • measurements_mfa: An MFA tuple that defines what function will be executed that will emit Telemetry events.
  • metrics: A list of Telemetry Metrics structs that define the metrics.
  • poll_rate: An integer representing the millisecond between metrics samples.
  • opts: A keyword list of options to configure the execution of the polling job. The supported options are currently:
    • detach_on_error: Configures whether your MFA will stop being invoked after it encounters an error. The default for this is true.

Functions

Create a struct that encompasses a group of polling type metrics. The group_name should be unique and should follow the following convention: <APPLICATION>_<SHORT DESCRIPTION>_manual_metrics. For example, BEAM related memory metrics have a group_name of: :beam_memory_polling_events

Types

@type t() :: %PromEx.MetricTypes.Polling{
  group_name: atom(),
  measurements_mfa: PromEx.measurements_mfa(),
  metrics: [PromEx.telemetry_metrics()],
  opts: keyword(),
  poll_rate: pos_integer()
}
  • group_name: A unique identifier for the collection of metrics.
  • measurements_mfa: An MFA tuple that defines what function will be executed that will emit Telemetry events.
  • metrics: A list of Telemetry Metrics structs that define the metrics.
  • poll_rate: An integer representing the millisecond between metrics samples.
  • opts: A keyword list of options to configure the execution of the polling job. The supported options are currently:
    • detach_on_error: Configures whether your MFA will stop being invoked after it encounters an error. The default for this is true.

Functions

Link to this function

build(group_name, poll_rate, measurements_mfa, metrics, opts \\ [])

View Source
@spec build(
  group_name :: atom(),
  poll_rate :: pos_integer(),
  measurements_mfa :: PromEx.measurements_mfa(),
  metrics :: [PromEx.telemetry_metrics()],
  opts :: keyword()
) :: t()

Create a struct that encompasses a group of polling type metrics. The group_name should be unique and should follow the following convention: <APPLICATION>_<SHORT DESCRIPTION>_manual_metrics. For example, BEAM related memory metrics have a group_name of: :beam_memory_polling_events