Live data from Hacker News

Instrumentation: The First Four Things You Measure

honeycomb.io

11–20 of 38 posts

Re: Instrumentation: The First Four Things You Measure

#11

Off Topic: Does anyone know what tools the author uses to make the diagrams?

Paper by 53 or Sketches or Sketchbook or any of the several sketching apps available for the IPad would be my guess.

I assumed it was whiteboard photos with hand-drawn photoshop masks.

Re: Instrumentation: The First Four Things You Measure

#13
While this is good advice, I feel it is a bit too over-simplified.

Counting incoming and outgoing requests misses a lot of potential data points when determining "is this my fault?"

I work mainly in system integrations. If I check for the ratio for input:output, then I may miss that some service providers return a 200 with a body of "Error".

A better message is to make sure your systems are knowledgeable in how data is received from downstream submissions, and to have a universal way of translating that feedback to a format your own service understands.

HTTP codes are (pretty much) universal. But let's say you forgot to inlcude a header or forgot to base64 encode login details or simply are using a wrong value for an API key. If your system knows that "this XML element means Y for provider X, and means Z in our own system", then you can better gauge issues as they come up, instead of waiting for customers to complain. This is also where tools like Splunk are handy, so you can be alerted to these kinds of errors as they come up.

Re: Instrumentation: The First Four Things You Measure

#14
post #7

> A histogram of the duration it took to serve a response to a request, also labelled by successes or errors. I recommend against this, rather have one overall duration metric and another metric tracking a count of failures. The reason for this is that very often just the success latency will end up being graphed, and high overall latency due to timing-out failed requests will be missed. The more information you put…

> rather have one overall duration metric What exactly would that be?

The duration metric as recommended by the article, but not broken out by success/failure.

Re: Instrumentation: The First Four Things You Measure

#16
post #7

> A histogram of the duration it took to serve a response to a request, also labelled by successes or errors. I recommend against this, rather have one overall duration metric and another metric tracking a count of failures. The reason for this is that very often just the success latency will end up being graphed, and high overall latency due to timing-out failed requests will be missed. The more information you put…

By creating events that contain both the duration of the request and whether it succeeded, you can create graphs that show you the detail you need. Unless you include those data together at the beginning, it will be impossible to tease them apart later on. Combining them into one graph will likely conceal the difference in the two cases, as you describe, unless you feed them in to a system that an natively tease them apart as easily as show them together (such as http://honeycomb.io). So it seems like the disagreement is more about visualization than collection (the section of the blog in which that quote appears).

The originally quoted advice, to show "the duration it took to serve a response to a request, also labelled by successes or errors" remains good advice, so long as the visualization of that data makes clear the separation.

I absolutely agree that careful consideration is required when choosing what to put on dashboards to avoid confusion. That seems to be a separate issue.

(bias alert - I work on Honeycomb, and care deeply about collecting data in a way that lets you pull away the irrelevant data to illuminate the real problems.)

Re: Instrumentation: The First Four Things You Measure

#17
Came across this which gives good insight into the 4 golden signals for a top-level health tracking: https://blog.netsil.com/the-4-golden-signals-of-api-health-a...

One thing of note in the graph is the tracking of response size. This would be very useful for 200 responses with "Error" in the text. Because then the response size would drop drastically below a normal successful response payload size.

In addition to Latency, Error Rates, Throughput and Saturation , folks like Brendan Gregg @ Netflix have recommended tracking capacity.

Re: Instrumentation: The First Four Things You Measure

#18

Came across this which gives good insight into the 4 golden signals for a top-level health tracking: https://blog.netsil.com/the-4-golden-signals-of-api-health-a... One thing of note in the graph is the tracking of response size. This would be very useful for 200 responses with "Error" in the text. Because then the response size would drop drastically below a normal successful response payload size. In addition to La…

Are you a plant? It must just be coincidence that the second post in the series is titled "measuring capacity." :) https://honeycomb.io/blog/2017/01/instrumentation-measuring-...

(bias alert - I work on Honeycomb)

Re: Instrumentation: The First Four Things You Measure

#19
Every request to and from the app should be instrumented. Paying addition to the requests to the app is a good start - but you really need detailed instrumentation of all downstream dependencies your service uses to process it's requests to understand where the issue is. It's often likely you're slow or throwing errors because a dependency you use is slow or throwing errors. Or maybe the upstream service complaining has changed it's request pattern and they're making more expensive queries. There is often a small minority of requests that are responsible for most of the performance issues so even if the overall volume hasn't changed, the composition and type of requests matter as well.

Re: Instrumentation: The First Four Things You Measure

#20
post #3

Author appears to use "downstream" and "upstream" to refer to "further down the stack" and "further up the stack". Is this normal usage? Seems reversed to me.

Seems reversed to me too. Literally, "upstream" is water coming from uphill, flowing to you, and then going "downstream" to some other destination.

If the river is data, then stuff you depend on is upstream from you, and things that depend on you are downstream.

Post reply on HN