Allow usage of consts and variables for stable metrics in static analysis

This commit is contained in:
Marek Siarkowicz
2019-10-25 18:49:47 +02:00
parent 08410cbf06
commit 4dd546cf2c
4 changed files with 144 additions and 32 deletions

View File

@@ -29,6 +29,7 @@ const (
errStableSummary = "Stable summary metric is not supported"
errInvalidNewMetricCall = "Invalid new metric call, please ensure code compiles"
errNonStringAttribute = "Non string attribute it not supported"
errBadVariableAttribute = "Metric attribute was not correctly set. Please use only global consts in same file"
errFieldNotSupported = "Field %s is not supported"
errBuckets = "Buckets should be set to list of floats, result from function call of prometheus.LinearBuckets or prometheus.ExponentialBuckets"
errLabels = "Labels were not set to list of strings"