Hi Tiese,
the gauge value gets recomputed with every request, there is no caching or so. The application should make sure that the computation is as fast as possible, because it basically blocks the return of the /metrics request. If some sort of caching of the result is desired (to avoid doing the expensive computation too often), it needs to be done at the application level.
I'm thinking that part of the spec made you confused about this. Was it this sentence?
I agree this is somewhat misleading, especially when it comes to gauges. We'll get this clarified for the next release.
Cheers
Jan