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
This commit is contained in:
Pau Espin 2021-05-31 13:19:13 +02:00 committed by laforge
parent 09f075fad6
commit 05047b7f27
1 changed files with 2 additions and 0 deletions

View File

@ -606,6 +606,8 @@ struct gprs_ns2_vc *ns2_vc_alloc(struct gprs_ns2_vc_bind *bind, struct gprs_ns2_
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);