Commit 5910453e by Carl Bergquist Committed by GitHub

Merge pull request #9560 from mtanda/prometheus_46_metric_name_matching

(prometheus) allow ":" character for metric name
parents eda3cffe ebebbddb
...@@ -8,7 +8,7 @@ export class PromCompleter { ...@@ -8,7 +8,7 @@ export class PromCompleter {
labelNameCache: any; labelNameCache: any;
labelValueCache: any; labelValueCache: any;
identifierRegexps = [/[\[\]a-zA-Z_0-9=]/]; identifierRegexps = [/[\[\]a-zA-Z0-9_:=]/];
constructor(private datasource: PrometheusDatasource) { constructor(private datasource: PrometheusDatasource) {
this.labelQueryCache = {}; this.labelQueryCache = {};
......
...@@ -43,7 +43,7 @@ var PrometheusHighlightRules = function() { ...@@ -43,7 +43,7 @@ var PrometheusHighlightRules = function() {
regex : "\\d+[smhdwy]" regex : "\\d+[smhdwy]"
}, { }, {
token : keywordMapper, token : keywordMapper,
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" regex : "[a-zA-Z_:][a-zA-Z0-9_:]*"
}, { }, {
token : "keyword.operator", token : "keyword.operator",
regex : "\\+|\\-|\\*|\\/|%|\\^|=|==|!=|<=|>=|<|>|=\\~|!\\~" regex : "\\+|\\-|\\*|\\/|%|\\^|=|==|!=|<=|>=|<|>|=\\~|!\\~"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment