aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

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

Closed vasilievip closed 1 year ago

vasilievip commented 5 years ago

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"
          }
        }
      },
Fetsivalen commented 3 years ago

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.

BrianNichols commented 3 years ago

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.

barkanido commented 3 years ago

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

Fetsivalen commented 3 years ago

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?

BrianNichols commented 3 years ago

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.

Aloren commented 3 years ago

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

BrianNichols commented 3 years ago

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

BrianNichols commented 1 year ago

Metrics functionality has been added to java client 7.0.0:

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