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

Prometheus text parser barfs on UTF-8 BOMs #1679

Closed
christianlavoie opened this Issue May 27, 2016 · 7 comments

Comments

Projects
None yet
5 participants
@christianlavoie
Copy link

christianlavoie commented May 27, 2016

UTF-8 BOMs at the beginning of a text format string confuse the text parser (prometheus will complain about an invalid metric name). Tested with 1.9.1.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented May 27, 2016

Yeah, that's kind of expected. The text format is fully specified and doesn't include BOMs.
Understanding BOMs would imply Prometheus could act according to whatever the BOM specifies. But it can only understand the one text format specified in https://prometheus.io/docs/instrumenting/exposition_formats/ .

What would be the rationale for supporting BOMs?

(BTW: The code that handles this is in prometheus/common, so we should arguable move this issue over there. But let's see what comes out of it...)

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented May 27, 2016

To be honest, I didn't know about BOMs yet, but research turned up:

"A protocol SHOULD forbid use of U+FEFF as a signature for those textual protocol elements that the protocol mandates to be always UTF-8, the signature function being totally useless in those cases."

(https://tools.ietf.org/html/rfc3629)

@grobie

This comment has been minimized.

Copy link
Member

grobie commented May 27, 2016

Lucky you @juliusv. I can remember dark times with PHP, Windows and UTF-8
... I didn't know they're still being used.

On Fri, May 27, 2016 at 5:02 PM, Julius Volz notifications@github.com
wrote:

To be honest, I didn't know about BOMs yet, but research turned up:

"A protocol SHOULD forbid use of U+FEFF as a signature for those textual
protocol elements that the protocol mandates to be always UTF-8, the
signature function being totally useless in those cases."

(https://tools.ietf.org/html/rfc3629)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1679 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAANaHNiUV_3Z1JFAsaPwFOMVpWct1Opks5qF1v0gaJpZM4IotOs
.

@christianlavoie

This comment has been minimized.

Copy link
Author

christianlavoie commented May 28, 2016

As far as I can tell, most "modern" Windows tools require them.
On May 27, 2016 5:13 PM, "Tobias Schmidt" notifications@github.com wrote:

Lucky you @juliusv. I can remember dark times with PHP, Windows and UTF-8
... I didn't know they're still being used.

On Fri, May 27, 2016 at 5:02 PM, Julius Volz notifications@github.com
wrote:

To be honest, I didn't know about BOMs yet, but research turned up:

"A protocol SHOULD forbid use of U+FEFF as a signature for those textual
protocol elements that the protocol mandates to be always UTF-8, the
signature function being totally useless in those cases."

(https://tools.ietf.org/html/rfc3629)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<
#1679 (comment)
,
or mute the thread
<
https://github.com/notifications/unsubscribe/AAANaHNiUV_3Z1JFAsaPwFOMVpWct1Opks5qF1v0gaJpZM4IotOs

.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1679 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAGUKgS8Nblx-E42Idf9c7o2i1uhoOKVks5qF15ngaJpZM4IotOs
.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Sep 9, 2016

We have a number of issues around the exposition format by now. How about moving them all into the docs repo, with a dedicated label? We should have clarity on the spec before starting any work, and the spec lives in the docs repo. So it might be the best point to track those issues.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Sep 9, 2016

@beorn7 beorn7 closed this Sep 9, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.