Skip to content

[surfacers.prometheus] Sanitize label values before exposing them #975

Description

@manugarg

This is particularly a problem for external and browser probes where we don't control label values. We should do this in prometheus surfacer. From official documentation:

label_value can be any sequence of UTF-8 characters, but the backslash (\), double-quote ("), and line feed (\n) characters have to be escaped as \\, \", and \n, respectively.

https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions