Attention is currently required from: iedemam, laforge, pespin. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27137 )
Change subject: stats: sanitize tcp stat name identifiers ......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Yes, the patch is simple but I don't really think the generated strings are less ugly. […]
I somehow forgot to send this:
The NSVCs currently set a name like this:
NSE00102-NSVC-UDP-127_0_0_1:23000-127_0_0_11:8888
This seems wrong for statsd as well, because a colon separates the name from the value - so we already have this issue in other places.
How about we: * Keep a statg->name as well as a statg->sanitized_name around * Let the user set any name through set_name() * Internally sanitize the name and save it to sanitized_name, keep the original in name
This way we don't need to remember to properly sanitize at every caller and VTY code can still show the pretty name. The control interface could choose to use the (statsd-sanitized) name or sanitize the original name itself.