I think optional TTL per time series is a good idea. It might have several use cases, it doesn't break anything, and it shouldn't be too hard to make. So why not? I might have used this feature to trigger short-lived alerts with arbitrary text in a label, something I wouldn't do without TTL because it would require a cleanup.

--
Best regards,
Evgeniy Yunkin

On 11/07/2023 22:23, 'Braden Schaeffer' via Prometheus Developers wrote:
They could live for 5s or 1 hour.  Does it really matter what you send to pushgateway? It supports counters so why not push them?

A TTL is all we need here.

On Sat, Jul 1, 2023 at 5:32 PM Bjoern Rabenstein <[email protected]> wrote:

    On 29.06.23 08:47, 'Braden Schaeffer' via Prometheus Developers wrote:
    > It's the same as calculating the total incoming request rate of
    N pods in a
    > deployment: sum(rate(grpc_request_count{service=foo}[5m]))

    🤔 I'm surprised that you seem to push a counter metric to the
    Pushgateway.

    I would say the intended use case for the Pushgateway is that a
    batch job pushes its metrics upon completion. That means you only ever
    have one value of those metrics, so a `rate` on those would always
    result in zero.

    Are you perhaps pushing multiple times during the runtime of your
    batch jobs? That would be weird indeed for a PGW use case. Why don't
    you just scrape your jobs normally then?

-- Björn Rabenstein
    [PGP-ID] 0x851C3DA17D748D03
    [email] [email protected]

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/CAKG2A1cBTOk_wrJi%2B2uO_2y6LKG0t0AMpMptBCdM6yTR_cTDxg%40mail.gmail.com <https://groups.google.com/d/msgid/prometheus-developers/CAKG2A1cBTOk_wrJi%2B2uO_2y6LKG0t0AMpMptBCdM6yTR_cTDxg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/12953903-7092-2b9c-d26f-7baf5b2c5c90%40gmail.com.

Reply via email to