| Hoi
The change to restore ‘-‘ as a valid char looks good to me. Remind me though, what was the problem that the original change to sanitize() was solving?
Prometheus allows any UTF8 character in label values.
Groet, Pim — Pim van Pelt / PBVP1-RIPE https://ipng.ch/
Hi, do anyone see an issue with changing the code to this ?
// Jimmy
{
for (int i = 0; i < len; i++)
{
- if (!isalnum (str[i]))
- str[i] = '_';
if (str[i] == '/')
str[i] = '_';
+ else if (str[i] == '-')
+
continue;
+ else if (!isalnum (str[i]))
+
str[i] = '_';
}
}
Sent from Outlook for Mac
Ok, I now see what you mean, I'll investigate it and see what I can do.
/Jimmy
Sent from Outlook for Mac
Thank you! The line I refer to replaces any non-alphanumeric character with an underscore, not only slash though. In this case, the string refers to a node name that contains an interface
name. I also use the exporter v2 and didn't see this issue with slash before, so rolling this out effectively renames metrics which makes their history a bit less useful after deployment.
Added a screenshot to the issue to demo the effect of removing only the token's sanitization.
Carlos
This is not a regression it’s changed so make the exports consistent and work with v2. The same interface was in some places exported with / and in some places with _
Jimmy
Hi,
Testing the v26.02-rc2 release, I have found a regression in the prometheus exporter that I can only attribute to a recent commit. I logged the issue in GitHub but please let me share it here to understand the intent so I
can propose a change that fits the release window if warranted.
Best,
Carlos
|
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#26816): https://lists.fd.io/g/vpp-dev/message/26816
Mute This Topic: https://lists.fd.io/mt/117826006/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-