Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move escapeMetricName to mapper #289

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

bakins
Copy link
Contributor

@bakins bakins commented Jan 16, 2020

#234 (comment)

I've copy pasted this into multiple personal projects as well, so let's export this.

We could integrate it more into mapping later.

@bakins bakins requested a review from matthiasr January 16, 2020 13:50
Copy link
Contributor

@matthiasr matthiasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for moving it first. I think the mapper should only return valid names to begin with; that's a change that I would communicate in the changelog so that mapper users aren't surprised

@@ -159,14 +104,14 @@ func (b *Exporter) handleEvent(event Event) {
errorEventStats.WithLabelValues("empty_metric_name").Inc()
return
}
metricName = escapeMetricName(mapping.Name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there anything that prevents us from making the mapper return an escaped name in the first place?

@matthiasr
Copy link
Contributor

the new files are lacking the license header, could you add it please?

@matthiasr
Copy link
Contributor

Thank you!

@matthiasr matthiasr merged commit c9c23a4 into prometheus:master Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants