Prometheus telemetry metrics for the Ex4pm.Stream.Pipeline Broadway pipeline.
Wraps TelemetryMetricsPrometheus.Core over Broadway's real telemetry events
(confirmed against the vendored deps/broadway/lib/broadway.ex telemetry docs):
[:broadway, :processor, :message, :stop]— emitted after each message is processed byhandle_message/3; measurement:durationis the processing time in native time units.[:broadway, :processor, :message, :exception]— emitted whenhandle_message/3raises.[:broadway, :batch_processor, :stop]— emitted after a batch is handled.
Start under a supervisor with {Ex4pm.Stream.Metrics, name: :my_metrics} (or no
opts for the default name), then call scrape/0 (or scrape/1 with an explicit
name) to get the real Prometheus-format text.
Summary
Functions
Real TelemetryMetricsPrometheus.Core child spec, ready for a supervision tree.
The default reporter name used when no explicit :name is given.
The list of real Telemetry.Metrics definitions built over Broadway's telemetry events.
Scrapes the default-named Prometheus reporter and returns real Prometheus-format text.
Scrapes the named Prometheus reporter and returns real Prometheus-format text.
Functions
@spec child_spec(keyword()) :: Supervisor.child_spec()
Real TelemetryMetricsPrometheus.Core child spec, ready for a supervision tree.
@spec default_name() :: atom()
The default reporter name used when no explicit :name is given.
@spec metrics() :: [Telemetry.Metrics.t()]
The list of real Telemetry.Metrics definitions built over Broadway's telemetry events.
@spec scrape() :: String.t()
Scrapes the default-named Prometheus reporter and returns real Prometheus-format text.
Scrapes the named Prometheus reporter and returns real Prometheus-format text.