Documentation states that serviceprofile regexes are in golang dialect, but this is not true
https://linkerd.io/2.10/tasks/getting-per-route-metrics/#troubleshooting
The regex matchers are evaluated by the rust regex engine, not the golang one, so this troubleshooting advice is incorrect.
As an example of the difference, [\w-,] is evaluated differently
between the two.
- In golang, this is a class containing all "word chars" (\w), the
literal
-and the literal,. The hyphen is not considered a request for a range of chars, because it doesn't make sense to open a range with a character class. - In rust, this is an invalid regex, because it doesn't make sense to open a range with a character class.
As soon as I saw this issue I immediately wondered what kind of terrible situation led you to discovering it. 😬
Part of the issue was surely me, over fitting for the characters we expected in path parameters when [^/]+ would do the job in all cases and likely in all dialects. :man_facepalming:
But testing against the wrong engine surely didn't help :sweat_smile:
We'll fix these docs. Sorry for the unintended consequences 😢