Slap.Streams.Metrics (slap_streams v0.4.0)

Copy Markdown View Source

Prometheus metrics from Slap.Streams.Telemetry's events and slap_cluster's, kept in ETS and rendered in the text exposition format by render/0 (served by Slap.Streams.HTTP.Metrics).

One metrics process runs per VM. Its labels do not distinguish separate Streams clusters on that VM. It ignores cluster events from other services, such as Slap.KV.Cluster.

MetricTypeLabels
slap_streams_append_duration_secondshistogramaccept to durable reply
slap_streams_appends_totalcounterresult
slap_streams_append_bytes_totalcounter
slap_streams_appends_rejected_totalcounterreason (backpressure)
slap_streams_write_failures_totalcounter
slap_streams_stream_serversgaugeshard
slap_streams_inflight_bytes, slap_streams_inflight_requestsgaugeshard
slap_streams_waitersgaugeshard (long-poll and SSE)
slap_streams_delete_backlog, slap_streams_expiry_duegaugeshard (job backlogs)
slap_streams_l0_ssts, slap_streams_sorted_runsgaugeshard (compaction backlog)
slap_streams_block_cache_hits_total, slap_streams_block_cache_misses_totalcountershard
slap_streams_durability_laggaugeshard (seqs written, not durable)
slap_streams_shard_events_totalcounterevent (start, stop, fenced)
slap_streams_store_probe_okgauge1 if the most recent store probe passed
slap_streams_http_requests_totalcountermethod, status
slap_streams_http_request_duration_secondshistogrammethod

This is a small exporter of its own rather than telemetry_metrics and its Prometheus reporter: the metrics are fixed, and it keeps the dependencies to telemetry.

Summary

Functions

Returns a specification to start this module under a supervisor.

The metrics in the Prometheus text format.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

render()

@spec render() :: iodata()

The metrics in the Prometheus text format.

start_link(opts \\ [])