Skip to content

Commit

Permalink
Allow metric names with only a single character (#951)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Stäber <[email protected]>
  • Loading branch information
fstab authored Apr 10, 2024
1 parent fe02245 commit 4a6495a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class PrometheusNaming {
/**
* Legal characters for metric names, including dot.
*/
private static final Pattern METRIC_NAME_PATTERN = Pattern.compile("^[a-zA-Z_.:][a-zA-Z0-9_.:]+$");
private static final Pattern METRIC_NAME_PATTERN = Pattern.compile("^[a-zA-Z_.:][a-zA-Z0-9_.:]*$");

/**
* Legal characters for label names, including dot.
Expand Down

0 comments on commit 4a6495a

Please sign in to comment.