Hi there. On my dashboards, I have “Error rate” charts from APM. All others are already converted to NRQL-based ones (the New dashboard type). When I use the builder to get the error rate chart it works fine showing data similar to APM one. E.g. this one works fine:
SELECT percentage(count(*), WHERE error is true) AS 'Error rate' FROM Transaction WHERE appName = '.....' TIMESERIES SINCE 3 hours ago
But what I want to achieve is to facet it by error type, so I can see the percentage of each error code across the overall traffic. That is, if there are 10 transactions, one with http 400, and 2 with http 500, and 7 http 200, I want to see 2 points on the chart: 10% and 20%.
But the moment I add a facet, the “100%” becomes not the overall count of transactions but the count of error transactions only. So if at certain point in time I have only errors with response code 405, that 405 takes 100%, even though the overall error rate may be 0.5%.
I also see all sorts of weird behavior when there are different consecutive error types, or when the calculation is done through
select count(transactionname)/count(name) from transactionError, transaction.
Is this scenario supported at all? If yes - how can I get the expected results for the dashboard.