Skepfyr / little-loadshedder

A Rust hyper/tower service that implements load shedding with queuing & concurrency limiting based on latency.
Apache License 2.0
144 stars 2 forks source link

Sort out metrics #3

Open Skepfyr opened 6 months ago

Skepfyr commented 6 months ago

This repo currently uses the metrics crate but I suspect the ecosystem will settle on opentelemetry, however a bigger problem is that emitting metrics directly from the load shedder is a bit weird because if you have mor ethan one they'll interfere with each other.

I think the options are:

  1. Stop emitting metrics (and instead allow more visibility into the state of the load shedder.
  2. Allow people to provide and identifier for the load shedder instance, allowing us to stick it into a label.

If anyone's reading this and want's to improve observability & metrics, then go ahead (although maybe leave your plan here first. I'm unlikkely to make this change as I don't actually use this library for anything.