Merge branch 'fix/prometheus-single-stat-point-slot' into 'master'
fix(prometheus-exporter): write to container[0] in single-stat-point mode See merge request rist/librist!345
This commit is contained in:
@@ -43,6 +43,10 @@ Bug Fixes:
|
||||
- Prometheus exporter: counter rows in multiple_metric_datapoints
|
||||
mode now have a space between the value and the timestamp.
|
||||
Affected every existing _total row.
|
||||
- Prometheus exporter: in single_stat_point mode, the displayed
|
||||
value no longer freezes at the first callback and silently
|
||||
drops every subsequent sample. Affected all receiver-flow,
|
||||
sender-peer, and per-peer-receiver gauges.
|
||||
- Receiver flow stats: bitrate, bitrate_retries, bitrate_rejected
|
||||
and bitrate_ts_nulls now decay to zero when the corresponding
|
||||
traffic stops, instead of remaining frozen at the last value
|
||||
|
||||
@@ -389,7 +389,9 @@ void rist_prometheus_handle_client_stats(struct rist_prometheus_stats *ctx, cons
|
||||
s->container_count++;
|
||||
}
|
||||
} else {
|
||||
s->container_offset = 1;
|
||||
/* Single-stat-point mode: format reads container[0] only
|
||||
* (container_count stays at 1), so the next write must land there. */
|
||||
s->container_offset = 0;
|
||||
s->container_count = 1;
|
||||
}
|
||||
|
||||
@@ -446,7 +448,9 @@ void rist_prometheus_handle_client_stats(struct rist_prometheus_stats *ctx, cons
|
||||
ps->container_count++;
|
||||
}
|
||||
} else {
|
||||
ps->container_offset = 1;
|
||||
/* Single-stat-point mode: format reads container[0] only
|
||||
* (container_count stays at 1), so the next write must land there. */
|
||||
ps->container_offset = 0;
|
||||
ps->container_count = 1;
|
||||
}
|
||||
}
|
||||
@@ -536,7 +540,9 @@ void rist_prometheus_handle_sender_peer_stats(struct rist_prometheus_stats *ctx,
|
||||
s->container_count++;
|
||||
}
|
||||
} else {
|
||||
s->container_offset = 1;
|
||||
/* Single-stat-point mode: format reads container[0] only
|
||||
* (container_count stays at 1), so the next write must land there. */
|
||||
s->container_offset = 0;
|
||||
s->container_count = 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user