khonsulabs / bonsaidb

A developer-friendly document database that grows with you, written in Rust
https://bonsaidb.io/
Apache License 2.0
1.01k stars 37 forks source link

Add Metrics #162

Open ecton opened 2 years ago

ecton commented 2 years ago

Users will want to be able to determine what the database is spending its time doing. We need to generate metrics of various operations within BonsaiDb. Generating metrics, however, isn't the real challenge.

We should support storing this data using our own time series support (#142), but also support sending these metrics out to other metric collectors. At the BonsaiDb level metrics backends should be able to be plugged in using a trait implementation, and BonsaiDb's implementation should use that same trait.

As such, we need to look at projects such as OpenTelemetry, Prometheus, InfluxDb, and maybe more to compare and contrast the feature sets of the ingestion APIs.