Add metrics for actors and persistence

Open
#156 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start by reading the implementation of receive_incoming and the metrics facade documentation linked in the issue. Map the proposed actor and persistence measurements to the candidate events listed here, then benchmark the zero allocation path and settle metric names, labels, and feature gating. Done means metrics cover the agreed events while per actor labels remain opt in.

Written by the indexing model from the issue text.

Description

enhancement

Part of #151.

tellus should emit metrics through the metrics facade, leaving the recorder and exporter to the application.

Candidates:

  • Counters for dead letters, failures and restarts.
  • Mailbox depth as a gauge, from the counter proposed in #152.
  • Message handling latency, the time receive or handle takes.
  • Persistence store latency and failures, for appends, reads and snapshot saves.

Labels are per actor type by default, from std::any::type_name, which is static. Per-actor labels are opt-in, because actor IDs are unbounded and would overload most metric backends.

Open questions:

  • Feature: receive_incoming is gated at zero allocations. A metrics macro without an installed recorder is cheap but not free, so benchmark it on that path before deciding whether metrics go behind a feature.
  • Naming: a consistent prefix and naming scheme for metric names and labels.
Dominant language
Rust
Stars
37
Forks
1
Avg merge
6h 36m
Merged PRs (30d)
123

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tellus-rs/tellus

All issues in tellus-rs/tellus

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.