Commit c66bf3c
Rewrite metrics implementation.
Previously, Feldera used the `metrics` crate for metrics. This crate has
lookup and locking overhead for individual metrics. It also ties metrics
recording to metrics reporting: if there is a need to report metrics in
more than one way, then one has to record the metrics in more than one
place. We wanted to be able to report metrics in the Prometheus exposition
format as well as in a bespoke JSON format, which meant that we had to
set up two different recorders, each of which had nontrivial overhead.
But the metrics we want are actually simple. The Prometheus exposition
format is also simple, and so is the JSON format. This commit stops using
the `metrics` crate, instead shifting to homegrown implementations of both
formats in a new module `dbsp_adapters::server::metrics`.
This commit deletes existing metrics that nothing actually incremented (or
that was only incremented in debug code like the memory storage backend).
They can't be that important if we weren't using them.
Incidentally, at first I wanted to use the `serde_prometheus` crate for
Prometheus exposition format, but it doesn't support basic features of the
format, like types and descriptions. The format is simple, and it's easy
enough to roll it ourselves, so I did that.
Signed-off-by: Ben Pfaff <blp@feldera.com>1 parent d70c655 commit c66bf3c
21 files changed
Lines changed: 1031 additions & 1020 deletions
File tree
- crates
- adapters
- src
- controller
- server
- dbsp/src
- circuit
- operator/communication
- storage/backend
- trace/spine_async
- nexmark
- benches/nexmark
- sqllib
- src
- storage
- src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | 97 | | |
101 | 98 | | |
102 | 99 | | |
| |||
140 | 137 | | |
141 | 138 | | |
142 | 139 | | |
| 140 | + | |
143 | 141 | | |
144 | 142 | | |
145 | 143 | | |
| |||
0 commit comments