You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The Issue
Im using victoriametrics to monitor the usage of a sqlite database:
`store_sqlite_request_total{query="DELETE FROM
'Order'",status="success"} 2`
Though I had problem with particular queries being not present in
victoriametrics. And It turns out that it was caused by me recording
queries with not escaped line breaks.
Here is a fragment of the resulting /metrics endpoint:
```
store_sqlite_request_total{query="
SELECT DISTINCT o.LocationId FROM \"Order\" o
LEFT JOIN Location l ON o.LocationId = l.Id
WHERE l.Id IS NULL
AND o.LocationId >= 60000000 AND o.LocationId <= 64000000;
",status="success"} 2
store_sqlite_request_total{query="DELETE FROM `Order`",status="success"} 2
store_sqlite_request_total{query="INSERT OR REPLACE INTO History VALUES (?,?,?)",status="success"} 15300
```
# A Proposed Solution
Issue a warning or error when being handed a metrics with a line break.
Im the PR I opted to simply error.
---------
Co-authored-by: Aliaksandr Valialkin <[email protected]>
0 commit comments