ns2: Use NSVC bufid in stats report
Use the new stats API to set a meaningful name for its stats group too,
so that they are easily to identify when reported.
Example on VTY "show stats":
"""
NSVC Peer Statistics (0)('UDP-NSE01800-NSVC01800'):
ALIVE response time : 0 ms
NS Bind Statistics:
Transmit backlog length: 0 packets
"""
Example reporting to statsd:
"""
my-stats-reporter-prefix.ns.nsvc.UDP-NSE01800-NSVC01800.alive.delay:0|g
"""
Related: SYS#5456
Change-Id: I4c696c615ba3416f8524d0797ce06c0ecd3a18f2
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 975909b..a57f577 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -606,6 +606,8 @@
bind->nsi->nsvc_rate_ctr_idx++;
+ osmo_stat_item_group_set_name(nsvc->statg, id);
+
llist_add(&nsvc->list, &nse->nsvc);
llist_add(&nsvc->blist, &bind->nsvc);
ns2_nse_update_mtu(nse);