On v0.15.0, newHandler is called once on start, which calls innerHandler once, which in turn creates the InMemoryCounterStore and InMemoryHistogramStore for delta metrics aggregation. innerHandler then returns an http.Handler for ServeHTTP to call upon each request to /metrics.
The exception to the above (in v0.15.0) is when call-time metric filters are supplied via ?collect=. In that case innerHandler is invoked on every request, and delta metrics aggregation does not work.
Unfortunately, in my change, innerHandler is now invoked on every call to /metrics (similar to how on v0.15.0, it gets invoked on every call if there are call-time metric filters).
My latest change (https://github.com/prometheus-community/stackdriver_exporter/commit/bc18b73dab0e6454285d29150a7bcd99578da8d5) looks to have broken the
--monitoring.aggregate-deltas
feature 😞 My apologies! 🤦🏻On v0.15.0,
newHandler
is called once on start, which callsinnerHandler
once, which in turn creates theInMemoryCounterStore
andInMemoryHistogramStore
for delta metrics aggregation.innerHandler
then returns anhttp.Handler
forServeHTTP
to call upon each request to /metrics.The exception to the above (in v0.15.0) is when call-time metric filters are supplied via
?collect=
. In that case innerHandler is invoked on every request, and delta metrics aggregation does not work.Unfortunately, in my change, innerHandler is now invoked on every call to /metrics (similar to how on v0.15.0, it gets invoked on every call if there are call-time metric filters).
Steps to reproduce
On v0.15.0, delta aggregation works
But not if
?collect=
is used.On master, delta aggregation doesn't work at all