Skip to content

Query/Response Events

Metrics or "Stats"

Participating nodes in a Query/Response topology will broadcast events of structured statistics for the UI and monitoring applications to consume. The common data-shape encapsulates a way to communicate measurements, events, and node-identifying and describing meta-data.

The entry structure and format is encoded as a JSON UTF-8 encoded string.

json
{
  "elements": [
    {
      "key": "<string>",
      "value": "<string|number|boolean>",
      "timestamp": "<OPTIONAL:number>",
      "uuid": "<OPTIONAL:string>"
    }
    // ...
  ]
}

The key and value property pairs are used to encode any measurement. The timestamp is an optional property, that can be used to associate a measurement with a point in time since the EPOCH, in milliseconds.

The uuid property is used to identify the publishing node during its lifetime—effectively creating an aggregate for statistics to present. This means that in practice there are operational metrics which may come and go as well as logical statistics which may pertain to the topology or cluster of nodes.

Table of published statistics

KeyValueTimestampUUIDDescription
namestring-Name or identity of the node, or application
pidstring-Node process id, or -
hoststring-Node hostname, or unknown
uptimestring-Node uptime, or -
only_responsesboolean-Whether node has only responded true, or published queries false
count_queriesnumber-Number of published queries
count_consumed_responsesnumber-Number of consumed responses
count_published_responsesnumber-Number of published responses
count_fallbacksnumber-Number of fallbacks (no responses)
max_latencynumber-Largest recorded time between query and response, in milliseconds
min_latencynumber-Smallest recorded time between query and response, in milliseconds
avg_latencynumber-Average time between query and response, in milliseconds
throughput_queriesnumberNumber of queries published, since last notification
throughput_responsesnumberNumber of responses consumed, since last notification

Published under the Apache-2.0 license