No, that expression would give you the number of seconds since the start of
the last scrape of a target (or recording rule evaluation), relative to the
query evaluation timestamp.

For example, if you had a scrape interval of 15s, that value would move
somewhere roughly between 0s - 15s. See:
https://demo.promlens.com/?l=fycmtZbOWVY

On Thu, Feb 29, 2024 at 5:29 PM Vishwanath <vis...@gmail.com> wrote:

> As per Prometheus documentation - time(0 function doesn;t give current
> time, but the time at which expression is evaluated (below)
>
> time() returns the number of seconds since January 1, 1970 UTC. Note that
> this does not actually return the current time, but the time at which the
> expression is to be evaluated.
>
> Does this mean  "time()-timestamp(my_metric)" can plot ingestion latency
> for any metric ingested ?
>
> Thank you in advance for your answers.
>
> -Vishwanath.
>
> --
> 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 prometheus-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-developers/CAPVy_QUwoANF2zycwaKP%3D6APDLd%3DtZRr-j3sz-nnm6K2Eyrrcg%40mail.gmail.com
> <https://groups.google.com/d/msgid/prometheus-developers/CAPVy_QUwoANF2zycwaKP%3D6APDLd%3DtZRr-j3sz-nnm6K2Eyrrcg%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 prometheus-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/CA%2BT6YoweMGMyN%3DMZWimAz8gEUH8jN9eV_SoLrry-vrTrdDavYg%40mail.gmail.com.

Reply via email to