Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
robertcoltheart committed May 24, 2024
1 parent 1eaa880 commit 0eab064
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,6 @@ internal static string SanitizeMetricName(string metricName)
static StringBuilder CreateStringBuilder(string name) => new StringBuilder(name.Length);
}

private static string SanitizeOpenMetricsName(string metricName)
{
if (metricName.EndsWith("_total"))
{
return metricName.Substring(0, metricName.Length - 6);
}

return metricName;
}

internal static string RemoveAnnotations(string unit)
{
// UCUM standard says the curly braces shouldn't be nested:
Expand Down Expand Up @@ -182,6 +172,16 @@ internal static string RemoveAnnotations(string unit)
return sb.ToString();
}

private static string SanitizeOpenMetricsName(string metricName)
{
if (metricName.EndsWith("_total"))
{
return metricName.Substring(0, metricName.Length - 6);
}

return metricName;
}

private static string GetUnit(string unit)
{
// Dropping the portions of the Unit within brackets (e.g. {packet}). Brackets MUST NOT be included in the resulting unit. A "count of foo" is considered unitless in Prometheus.
Expand Down

0 comments on commit 0eab064

Please sign in to comment.