Change in libosmocore[master]: stats: Don't report osmo_counters

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Daniel Willmann gerrit-no-reply at lists.osmocom.org
Mon Apr 29 11:12:16 UTC 2019


Daniel Willmann has uploaded this change for review. ( https://gerrit.osmocom.org/13807


Change subject: stats: Don't report osmo_counters
......................................................................

stats: Don't report osmo_counters

In the case of statsd this has never worked because it was reported as a
rate (c)ounter and not a (g)auge.
Nowadays we don't seem to have so many osmo_counters anyway, so let's
just remove support for them here and migrate existing ones to
osmo_stat_item.

Change-Id: I78578122aaea07d541b377ad39dd830c38c55e7a
---
M src/stats.c
1 file changed, 4 insertions(+), 19 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/07/13807/1

diff --git a/src/stats.c b/src/stats.c
index b5adbf2..729301f 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -667,30 +667,15 @@
 	return 0;
 }
 
-/*** osmo counter support ***/
+/*** osmo counter support (deprecated) ***/
 
 static int handle_counter(struct osmo_counter *counter, void *sctx_)
 {
-	struct osmo_stats_reporter *srep;
-	struct rate_ctr_desc desc = {0};
-	/* Fake a rate counter description */
-	desc.name = counter->name;
-	desc.description = counter->description;
 
-	int delta = osmo_counter_difference(counter);
+	LOGP(DLSTATS, LOGL_NOTICE,
+		"osmo_counter stats export not reported: name=%s desc=%s\n",
+		counter->name, counter->description);
 
-	llist_for_each_entry(srep, &osmo_stats_reporter_list, list) {
-		if (!srep->running)
-			continue;
-
-		if (delta == 0 && !srep->force_single_flush)
-			continue;
-
-		osmo_stats_reporter_send_counter(srep, NULL, &desc,
-			counter->value, delta);
-
-		/* TODO: handle result (log?, inc counter(!)?) */
-	}
 
 	return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/13807
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78578122aaea07d541b377ad39dd830c38c55e7a
Gerrit-Change-Number: 13807
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann <dwillmann at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190429/14332a90/attachment.htm>


More information about the gerrit-log mailing list