The label name validation function was using the same regex as for the metric names. But according to the official prometheus docs the label names need to conform to a slightly different pattern. A check is also done for reserved label names; any that start with a double underscore (__).
The label name validation function was using the same regex as for the metric names. But according to the official prometheus docs the label names need to conform to a slightly different pattern. A check is also done for reserved label names; any that start with a double underscore (__).
Unit tests added and pass.