Framework Metric Collection

There are several types of metrics that are collected for use in Axoniq Platform:

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

Entitlement usage

Same as application report interval

Add-on usage counters, rate-limit state

Message statistics

Message statistics contain information about the payload types and their performance. Axoniq Platform 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": "EventProcessor",
        "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": [
    {
      "handler": {
        "handlerInformation": {
          "type": "EventProcessor",
          "component": "MyTodoItemEventHandler",
          "message": {
            "type": "EventMessage",
            "name": "TodoItemCreatedEvent"
          }
        },
        "message": {
          "type": "CommandMessage",
          "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
          }
        }
      }
    }
  ]
}

Note that since client version 2.0.0 for Axon Framework 5 aggregate statistics are no longer collected, as they no longer exist.

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": [
        {
          "name": "todo-group",
          "dlqSize": 0
        }
      ],
      "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,
          "processingLatency": 60,
          "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
  },
  "commandBus": {
     "capacity": 10,
     "usedCapacity": 2
  },
  "queryBus": {
     "capacity": 10,
     "usedCapacity": 2
  }
}

Entitlement usage

Entitlement usage reports tell Axoniq Platform how much of a paid add-on the application is using, and (when applicable) the state of the rate limiter that enforces it. This is purely a usage signal: no message bodies, identifiers, or business data are included.

Unlike the other reports above, entitlement usage is sent by the entitlement-manager library that ships with Axoniq’s paid add-ons, not by the Axon Framework connector itself. Applications without any paid add-on do not send this report at all.

The report is sent on the route entitlement-usage-report, on the same interval as the application report (driven by applicationReportInterval in the v2 client settings). Counters are reset after each report.

The report contains:

  • Add-on usage counters, broken down by add-on and message type (COMMAND, QUERY, EVENT), with success and failure counts

  • Optional rate-limiter state: available tokens, capacity, replenish rate, and how long the application has been delayed by the limiter during the interval

  • The length of the interval the report covers, in milliseconds

The structure for the entitlement usage report is as follows:

{
  "addonUsage": [
    {
      "addonName": "axon-framework-projection-replay",
      "messageTypeStats": [
        {
          "messageType": "EVENT",
          "count": 412,
          "failures": 0
        }
      ]
    }
  ],
  "rateLimitStats": {
    "availableTokens": 950,
    "capacity": 1000,
    "replenishRate": 100,
    "maxDelayMs": 240,
    "totalDelayMs": 1820
  },
  "intervalMs": 60000
}

rateLimitStats is only included when an add-on with throughput control is configured. Otherwise, the field is omitted.

Other collected data

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