Previously, escaped double quotes would still be seen as ending the
quoting, potentially leading to wronk tokenization.
Signed-off-by: beorn7 <beorn@grafana.com>
This addresses a number of issues:
- It was impossible to include a literal '"' or a line break in the value.
- It was impossible to include '=', '~', or '!' in the value.
- It was not validated if the label name is valid.
- It was not validated if the value is valid UTF-8.
- No whitespace was allowed around the operator.
Signed-off-by: beorn7 <beorn@grafana.com>
The doc comments do not describe the current (arguably buggy) state,
but the desired state, as it will be implemented in future commits.
Signed-off-by: beorn7 <beorn@grafana.com>
* api/v2: add path and method to API v2 logs
When an API v2 handler logged a message, the log wouldn't include the
path and method. Since different handlers perform the same validations
(e.g. matchers for alerts and silences), it isn't easy to know which
handler was invoked (though the logged filename
+ line number provides a hint).
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Capitalize messages + improve logs
Signed-off-by: Simon Pasquier <spasquie@redhat.com>