I'm afraid I don't understand the question.

You showed a graph with one metric (actually zero metrics where there are 
gaps).  But then you said "combine 3 metrics above".  Which 3 metrics?  Can 
you show examples of the metrics with their labels?

If you mean the three sections of that line graph, then the legend shows 
that those line segments are all from the *same* timeseries.  A timeseries 
is defined as the same metric name and the same set of labels.  If there 
were multiple timeseries then prometheus would have shown them in the 
legend, and given each timeseries a different colour.

There could be multiple underlying timeseries which the sum() combines: 
that is, the subexpression 
function_calls_total{function="accelbyte-deleteusingsdk-fauzantest-1a00"} 
could select multiple timeseries - but since all those timeseries have the 
same value for the "function" label, sum by (function) (...) returns only a 
single timeseries.

As for the value resetting: you'll need to explain what this metric 
represents, and how it is generated.

if it's a counter, then resets are going to happen occasionally when your 
exporter restarts (unless it has a way to persist the counter when 
restarting).  Functions like rate() can be used to calculate rates of 
increase, which will skip the period where the counter resets, and 
increase() will extrapolate the rate over the given time period.  It makes 
no sense to sum() a counter with itself.

If it's a gauge, then something has gone down, and that's a matter of truth 
that the graph is showing you.

An example of the first case is if the value is incremented every time a 
function is called.  An example of the second case is a value showing you 
the number of workers which are available to process a given function.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" 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-users/b8405a5d-fe4a-4cda-b33d-0708c2e29e13o%40googlegroups.com.

Reply via email to