akkadotnet / Akka.Persistence.Sql

Linq2Db implementation of Akka.Persistence.Sql. Common implementation for SQL Server, Sqlite, Postgres, Oracle, and MySql.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Opt-in Metrics measurement

to11mtm opened this issue · comments

commented

It would be nice to add some Metrics measurement capabilities.

We should look for:

  • 'Opt in' behavior such that if metrics are disabled, the performance difference from before/after PR is negligible.
  • Tracking of number of rows written in an operation (so that rows/sec may be measured)
  • Time of operations:
    • read, write, delete

Questions:

  • How do we want to let these metrics be observed?
    • Possibly an interface?
      • If people want Eventstream, they can wrap from that.
      • If people want direct, they can do that too.
  • How granular do we want to be? DB RoundTrips are definitely on the menu, but should we also measure total operation time?
    • (example, when ReplayMessagesAsync has to make multiple round trips, do we report that as well as a separate metric?)
  • Should we metric errors?
    • may be useful for scenarios where a RetryPolicy is defined.