Here’s a pro-tip for you when you record metrics on Instrumental: anything that can be a
gauge, should be a
Why is that? You can use the Instrumental Query Language to get
increment data, because we record the number of times we receive your
Let’s say you’re recording the time it takes to complete one request on your server when a user signs up, but you also want to know how often that is happening. Rather than recording two metrics, you only need one.
In ruby, you could do this automatically with rack middleware:
On your dashboard, you could add a graph with these two metrics:
app.request.signup.create gauge_count(app.request.signup.create) as signups
gauge_countwill graph the number of times a
gauge metric was received in a given time period. So now you know how many signups you had, and how long signups take, all from one
Here’s a sample graph with those two metrics with some fake data (request time in milliseconds).
And here’s a graph with the timing metric hidden so you can see the number of signups in a given period. It was a great time for signups!
See you next time!