TimelessMetricsDashboard.Reporter (timeless_metrics_dashboard v0.4.12)

Copy Markdown View Source

Telemetry reporter that writes Telemetry.Metrics events into a Timeless store.

The handler callback runs in the caller's process, so the hot path is a bounded ETS insert. A periodic flush drains accepted entries into Timeless in chunks. Entries are deleted only after a successful write, so concurrent inserts and transient store failures do not lose queued points.

Options

  • :store (required) — Timeless store name (atom)
  • :metrics — list of Telemetry.Metrics structs (default: [])
  • :flush_interval — milliseconds between batch flushes (default: 10_000)
  • :prefix — metric name prefix (default: "telemetry")
  • :name — GenServer name (default: TimelessMetricsDashboard.Reporter)
  • :max_buffer_size — maximum queued points; newer points are dropped once full (default: 100_000)
  • :batch_size — maximum points written per store call (default: 5_000)

Summary

Functions

Returns a specification to start this module under a supervisor.

Synchronous flush — drains the buffer immediately. Useful for testing.

Returns reporter buffer, drop, write-error, and callback-error counters.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

flush(name \\ __MODULE__)

Synchronous flush — drains the buffer immediately. Useful for testing.

start_link(opts)

stats(name \\ __MODULE__)

Returns reporter buffer, drop, write-error, and callback-error counters.