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
Update expfmt/text_parse.go to support the new UTF-8 syntax #554
Comments
I spoke with @ywwg and I would be willing to help with this one over the holidays, could I get this one assigned to me please? |
Notes from the chat: the basic changes are:
|
👍🏽 Thanks! |
@jmichalek132 checking in, any progress on this? |
sorry unfortunately not I was sick over the holidays, but I'll take a stab at this over the weekend. |
So finally looking into this today, first thing I am unclear on based on the proposal is what should be the behaviour with the metric name in the prometheus metadata. Examples:
This is not ok due to:
This is not ok:
This is not ok either:
Also when implemeting all these changes, should I do it in a way that can turn on support for utf-8 with a flag, or just implement the changes directly. |
Also when the metric name is surrounded by the double quote I assume we need to validate that if the metric name contains double qoute it's properly escaped right? Otherwise the parsing could break. |
In the other parsers, I changed them so they can just read the new format without a flag. It was not practical to create switching logic without duplicating all the parsers. Let's start by not using a flag.
Yes that's correct. The current parser supports escaping already, so it should be fine to use that escaping inside double quotes for the TYPE and HELP lines:
|
This adds support for the new grammar of `{"metric_name", "l1"="val"}` to promql and some of the exposition formats. This grammar will also be valid for non-UTF-8 names. UTF-8 names will not be considered valid unless model.NameValidationScheme is changed. This does not update the go expfmt parser in text_parse.go, which will be addressed by prometheus/common#554. Part of prometheus#13095 Signed-off-by: Owen Williams <owen.williams@grafana.com>
This adds support for the new grammar of `{"metric_name", "l1"="val"}` to promql and some of the exposition formats. This grammar will also be valid for non-UTF-8 names. UTF-8 names will not be considered valid unless model.NameValidationScheme is changed. This does not update the go expfmt parser in text_parse.go, which will be addressed by prometheus/common#554. Part of prometheus#13095 Signed-off-by: Owen Williams <owen.williams@grafana.com>
This adds support for the new grammar of `{"metric_name", "l1"="val"}` to promql and some of the exposition formats. This grammar will also be valid for non-UTF-8 names. UTF-8 names will not be considered valid unless model.NameValidationScheme is changed. This does not update the go expfmt parser in text_parse.go, which will be addressed by prometheus/common#554. Part of prometheus#13095 Signed-off-by: Owen Williams <owen.williams@grafana.com>
This adds support for the new grammar of `{"metric_name", "l1"="val"}` to promql and some of the exposition formats. This grammar will also be valid for non-UTF-8 names. UTF-8 names will not be considered valid unless model.NameValidationScheme is changed. This does not update the go expfmt parser in text_parse.go, which will be addressed by prometheus/common#554. Part of prometheus/prometheus#13095 Signed-off-by: Owen Williams <owen.williams@grafana.com>
Checking in on this again, is there a PR attached? |
Sorry for the delays I didn't have a chance to make much progress on this, if it's delays are an issue, please do re-assign it to someone else. Otherwise I should be able get time to work on it / publish draft next weekend. |
Thanks for letting me know! yeah I think we need to move ahead on this more quickly so I'll be reassigning it. I appreciate your contribution regardless |
I'll take this issue 👍 |
text_parse is a go implementation of a parser for the plain prometheus text format
The text was updated successfully, but these errors were encountered: