Axon Framework Metric Collection

There are several types of metrics that are collected for use in AxonIQ Console:

Type Interval Data

Message statistics

20 seconds

Counts, latencies, relationships

Aggregate statistics

20 seconds

Counts, latencies

Processor statistics

5 seconds

Position, status, latencies

Application statistics

10 seconds

JVM Metrics, Axon Framework metrics

Message statistics

Message statistics contain information about the payload types and their performance. AxonIQ Console collects:

  • Execution times of several individual parts

  • Quantities and rate

  • Relationship to other messages (flow)

What we don’t collect:

  • Message bodies

  • Non-Axon Framework information

You can see an example of this information down below:

{
  "handlers": [
    {
      "handler": {
        "type": "HANDLER",
        "component": "MyTodoItemEventHandler",
        "message": {
          "type": "EventMessage",
          "name": "TodoItemCreatedEvent"
        }
      },
      "statistics": {
        "count": 25,
        "failed": 5,
        "timer": {
          "min": 0,
          "mean": 45,
          "median": 55,
          "percentile90": 60,
          "percentile95": 80,
          "max": 100
        },
        "metrics": {
          "event_commit": {
            "min": 0,
            "mean": 14,
            "median": 16,
            "percentile90": 30,
            "percentile95": 35,
            "max": 39
          }
        }
      }
    }
  ],
  "dispatchers": [
    {
      "dispatchedMessage": {
        "handlerInformation": {
          "type": "HANDLER",
          "component": "MyTodoItemEventHandler",
          "message": {
            "type": "EventMessage",
            "name": "TodoItemCreatedEvent"
          }
        },
        "message": {
          "type": "Command",
          "name": "ReportTodoItemCreatedCommand"
        }
      },
      "statistics": {
        "count": 12
      }
    }
  ]
}

Aggregate statistics

Aggregate statistics are similar to handler statistics, but the statistics of all handlers of the aggregate are combined. This includes:

  • Latency and throughput

  • Event store commit performance

  • Error rates

  • Aggregate lock and load times

The structure for the aggregate statistics is as follows:

{
  "aggregates": [
    {
      "aggregate": {
        "name": "MyTodoAggregate",
      },
      "statistics": {
        "count": 25,
        "failed": 5,
        "timer": {
          "min": 0,
          "mean": 45,
          "median": 55,
          "percentile90": 60,
          "percentile95": 80,
          "max": 100
        },
        "metrics": {
          "event_commit": {
            "min": 0,
            "mean": 14,
            "median": 16,
            "percentile90": 30,
            "percentile95": 35,
            "max": 39
          }
        }
      }
    }
  ]
}

Processor statistics

The processor statistics contain information about the event processors in your application. This includes:

  • Processing segments and their status

  • Latency and throughput

  • Position in the event stream

  • Error messages

  • Configuration information (processor type, token store, etc)

The structure for the processor statistics is as follows:

{
  "processors": [
    {
      "name": "todo-processor",
      "processingGroups": [
        "todo-group"
      ],
      "tokenStoreIdentifier": "2378628a87daw8",
      "mode": "TRACKING",
      "started": true,
      "error": false,
      "segmentCapacity": 100,
      "activeSegments": 1,
      "segments": [
        {
          "segment": 0,
          "mergeableSegment": 1,
          "mask": 1,
          "oneOf": 2,
          "caughtUp": true,
          "error": false,
          "errorType": null,
          "errormessage": null,
          "ingestLatency": 23,
          "commitLatency": 45,
          "position": 39028302,
          "resetPosition": null
        }
      ]
    }
  ]
}

Application statistics

Your JVM metrics and global Axon Framework metrics are also collected. This includes:

  • CPU Usage

  • Memory usage

  • Axon Server bus capacity

  • Thread counts

The structure for the application statistics is as follows:

{
  "loadAverage": 2,
  "systemCpuUsage": 0.2,
  "processCpuUsage": 0.1,
  "liveThreadCount": 175,
  "heapUsage": {
    "used": 50000,
    "committed": 100000,
    "max": 200000
  }
}

Other collected data

No other data is collected automatically by AxonIQ Console. However, depending on configuration, users can access application data through the UI. These fetch information via operations.