Commit 61f3bc5
committed
fix(metrics): publish failure metrics for SQL analytics engine path
The SQL analytics router in SQLPlugin handled errors by sending a raw
BytesRestResponse without incrementing FAILED_REQ_COUNT_CUS or
FAILED_REQ_COUNT_SYS, so SQL+AE failures were invisible in stats. Unlike
the PPL path, the router owns the channel and never routes failures back
to RestSqlAction's terminal error handler.
Make RestSqlAction.handleException public static and call it from the
analytics router onFailure callbacks so failure metrics and proper error
formatting are applied consistently. The PPL+AE path already publishes
metrics via RestPPLQueryAction's listener, so no change is needed there.
Signed-off-by: Chen Dai <daichen@amazon.com>1 parent ec433f4 commit 61f3bc5
2 files changed
Lines changed: 7 additions & 8 deletions
File tree
- legacy/src/main/java/org/opensearch/sql/legacy/plugin
- plugin/src/main/java/org/opensearch/sql/plugin
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
| 346 | + | |
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | | - | |
| 266 | + | |
268 | 267 | | |
269 | 268 | | |
270 | 269 | | |
| |||
282 | 281 | | |
283 | 282 | | |
284 | 283 | | |
285 | | - | |
286 | | - | |
| 284 | + | |
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
| |||
0 commit comments