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

Escaping? #151

Open
blckngm opened this issue Jun 7, 2023 · 3 comments
Open

Escaping? #151

blckngm opened this issue Jun 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@blckngm
Copy link

blckngm commented Jun 7, 2023

Shouldn't help strings and label values be escaped?

https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#escaping

@mxinden mxinden added the bug Something isn't working label Jun 9, 2023
@mxinden
Copy link
Member

mxinden commented Jun 9, 2023

Good point @blckngm. Thanks for reporting. Yes.

I wonder whether we should actively escape them or simply panic (in debug mode!) when they are not escaped. Preference for the latter.

Do you want to provide a patch @blckngm?

@blckngm
Copy link
Author

blckngm commented Jun 10, 2023

Escaping them on encoding, writing one character at a time, shouldn't have much performance penalty as long as the writer is buffered.

@mxinden
Copy link
Member

mxinden commented Jul 10, 2023

Fine with escaping one character at a time as long as we have an accompanying benchmark that proves that this is not a performance bottleneck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants