Escaping?
Shouldn't help strings and label values be escaped?
https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#escaping
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?
Escaping them on encoding, writing one character at a time, shouldn't have much performance penalty as long as the writer is buffered.
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.