fix: remove __name__ matcher from processed matcher list (#3213)

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2024-01-22 16:50:28 +08:00
committed by GitHub
parent 278e4c8c30
commit 8cc7129397
3 changed files with 40 additions and 1 deletions

View File

@@ -557,6 +557,7 @@ impl PromPlanner {
name: &Option<String>,
) -> Result<Matchers> {
self.ctx.reset();
let metric_name;
if let Some(name) = name.clone() {
metric_name = Some(name);
@@ -581,7 +582,7 @@ impl PromPlanner {
.field_column_matcher
.get_or_insert_default()
.push(matcher.clone());
} else {
} else if matcher.name != METRIC_NAME {
let _ = matchers.insert(matcher.clone());
}
}