Skip to content

Commit fdae68a

Browse files
jukkarnashif
authored andcommitted
net: prometheus: Network statistics need pointer to collector
When creating prometheus network statistics variables, we need to map the variables back to the collector, so add a backpointer to it. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 8e83cf0 commit fdae68a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/zephyr/net/prometheus/metric.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ enum prometheus_metric_type {
4747
struct prometheus_metric {
4848
/** Slist metric list node */
4949
sys_snode_t node;
50+
/** Back pointer to the collector that this metric belongs to */
51+
struct prometheus_collector *collector;
5052
/** Type of the Prometheus metric. */
5153
enum prometheus_metric_type type;
5254
/** Name of the Prometheus metric. */

0 commit comments

Comments
 (0)