DESCRIPTION

JVMCBC-60: Adding support for latency metrics.

Motivation
----------
A common question users ask themselves is "what is going on
in my application/SDK", especially when it comes to failures
and timeouts. Since timeouts are the effect and not the cause,
increased supportability is needed to help answer these questions
as quickly and reliably as possible.

One way to help is to include latency metrics as fine grained
as possible to ditinguish problems that are happening on the
network/server and not on the client (or to see the issue is
actually in the application server).

Modifications
-------------
This changeset builds on the new metrics infrastructure to collect
and emit latency information on a per node -> service -> request
-> status basis to get fine grained information.

Under the covers, we utilize and fat jar the HdrHistogram and
LatencyUtil libraries which are public domain and do a great
job in correctly collecting and emitting this information.

One important aspect is that those events are always collected
and emitted if someone listens, so hopefully information
will be available in the field if the issue happened.

By default the emit interval is one hour to not spam the
logs, but it can be lowered if constant monitoring is needed
(for example to feed it into a dashboard).

Result
------
Latency metrics are emitted onto the event bus, helping to
accurately measure network latencies.

Change-Id: Ib025554d2bcbf7dee51aae154efedae104744ca0


COMMENTS

author: Natasha Sullivan
date: 2015-07-22 09:23:01.786000000

Uploaded patch set 4.

-------------------------------------
author: Estrella Humphrey
date: 2015-07-22 10:15:37.179000000

Patch Set 4:

(1 comment)

Line:116, src/main/java/com/couchbase/client/core/endpoint/AbstractGenericHandler.java -> typo

-------------------------------------
author: Gerrit Code Review
date: 2015-07-22 12:06:42.769000000

Change has been successfully cherry-picked as 7c259d81800f52b65cbd68d93bc6236c667d4839

-------------------------------------
