Shouldn't help strings and label values be escaped? https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#escaping
Activity
mxinden commentedon 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 commentedon 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 commentedon 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.
krisztianfekete commentedon Sep 23, 2026
Closing this and merging it with #346