electric-sql / electric

Sync little subsets of your Postgres data into local apps and services.
https://electric-sql.com
Apache License 2.0
6.16k stars 143 forks source link

Resource use endpoint? #1454

Closed thruflo closed 1 month ago

thruflo commented 2 months ago

We're doing open telemetry -> honeycomb to get resource use data out of the system. But this requires an external system with persistence, correlation of timing etc.

In many cases, it could be easier to just call an endpoint to get the current resource use stats. That would allow a benchmark to just GET /_stats or similar via a simple web request and would be much simpler, operationally.

alco commented 2 months ago

This can be implemented via an approach similar to the one @icehaunter chose for metrics collection in previous Electric. Embed the metrics collector in the sync service process and use a formatter that prints out aggregated metrics when the /_stats endpoint is hit.

balegas commented 1 month ago

We created the /metrics endpoint Closed by #1487