Signal fx signal flow calculating error rate

144 Views Asked by At

I am using micrometer to publish signalfx metrics.

I have a count for http_status with http status code as a tag. I am able to see this in the splunk observability cloud dashboard

E = data('http_status.count', filter=filter('Status', '200')).publish(label='E')
G = data('http_status.count', filter=filter('Status', '500')).publish(label='G')

enter image description here

Now my question is, how do I calculate error rate using signal flow query? I want to do this-> plot 4xx/total calls and plot 5xx/total calls

1

There are 1 best solutions below

0
On

You can start with getting the total count first without any filter

A = data('http_status.count').publish(label='A')

B = data('http_status.count', filter=filter('Status', '4*')).publish(label='B')

You will see Enter Formula, click on it.

Add the formula (B/A)*100.

Remember to switch off the visibility for A & B