aerospike-client-java icon indicating copy to clipboard operation
aerospike-client-java copied to clipboard

Provide latency metrics out of client and listener to integrate with metrics registry

Open vasilievip opened this issue 6 years ago • 7 comments

Example: https://docs.couchbase.com/java-sdk/2.7/collecting-information-and-logging.html#metric-events

"10.142.111.102": {
    "BINARY": {
      "GetRequest": {
        "NOT_EXISTS": {
          "metrics": {
            "percentiles": {
              "50.0": 124,
              "90.0": 199,
              "95.0": 234,
              "99.0": 489,
              "99.9": 3784
            },
            "min": 69,
            "max": 175112,
            "count": 74864,
            "timeUnit": "MICROSECONDS"
          }
        }
      },

vasilievip avatar Jun 19 '19 12:06 vasilievip

Hi Guys, any chance it will be considered as a part of the client? it is a really important feature for our services all users of this client.

Fetsivalen avatar Feb 12 '21 15:02 Fetsivalen

We do provide latency bucket functionality in the java client benchmark application (-latency <columns>,<range shift increment>), but not in the client library itself.

There are no current plans to add this feature to the java client. Latency capture could be added independently by inheriting from AerospikeClient and adding new methods (with a stopwatch timer) that call the corresponding AerospikeClient methods.

BrianNichols avatar Feb 13 '21 00:02 BrianNichols

We would also be very happy to have those, even as an optional feature, one can create the client with/without.

barkanido avatar Feb 14 '21 06:02 barkanido

Hi @BrianNichols First of all thanks for a quick response. When you wrote about latency bucket functionality you meant this one? From what I understand that currently, your expectation is that every user of the library will implement it on their own, right?

Fetsivalen avatar Feb 15 '21 08:02 Fetsivalen

Yes, that one. We may implement something like this in the long term, but if you need it now, you will need to implement it on your own.

BrianNichols avatar Feb 16 '21 20:02 BrianNichols

@BrianNichols can we consider contributing this feature to the aerospike-client?

Aloren avatar Feb 24 '21 15:02 Aloren

Yes. I suggest adding AerospikeClientMetrics that implements IAerospikeClient and uses AerospikeClient as a member field.

BrianNichols avatar Feb 24 '21 19:02 BrianNichols

Metrics functionality has been added to java client 7.0.0:

https://download.aerospike.com/download/client/java/notes.html#7.0.0

BrianNichols avatar Aug 08 '23 18:08 BrianNichols