ipfs / rainbow

A specialized IPFS HTTP gateway
https://docs.ipfs.tech/reference/http/gateway/
Other
66 stars 11 forks source link

feat: add histograms for req duration and size #108

Closed 2color closed 3 months ago

2color commented 4 months ago

This PR instruments the handlers with 3 new histograms :

These are added with the intention to replace the the already existing summaries for the same three metrics. The main goal is to allow these metrics to be aggregated across multiple Rainbow instances (summaries cannot be aggregated)

Fixes #107

hacdias commented 3 months ago

@2color is this ready for review? Haven't looked at it because it's marked as draft and I wasn't sure.

2color commented 3 months ago

Yes please

2color commented 3 months ago

wonder if we can't just get rid of the summaries. After all, we haven't made any official Rainbow releases.

I strongly agree. Presuming that people are already running Rainbow and collecting metrics, they can just switch to use the histograms. If we remove the summaries, they'll see the queries not returning which should prompt them to switch. They also won't have to pay the cost of collecting both metrics after upgrading. Finally, it'll be a lot less confusing (why are both there etc.) and the code will be lighter.