Skip to content

Conversation

moreamazingnick
Copy link

The label values can be like any strange text so this needs to be escaped.

$output[] = $key . '="' . $value . '"';

since prometheus does not know any non numeric metric values, the metric value would not need the escape function, but I don't want to break any compatibility.

$output[] = $labelledValue['name'] . $this->encodeLabels($labelledValue['labels']) . ' ' . $this->escapeValue($labelledValue['value']);

see:
prometheus/prometheus#2227

Best Regards
Nicolas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant