When you don’t set config.metrics, the StatsD Policy sends the following metrics for each request.
Each metric name starts with the configured prefix.
In the names, <entity> is the name of the AI Agent or AI MCP Server that handled the request.
For AI Models, see Limitations.
|
Metric
|
Name
|
Description
|
Default type
|
request_count
|
kong.service.<entity>.request.count
|
Counts the request.
|
counter
|
latency
|
kong.service.<entity>.latency
|
Tracks the time in milliseconds between the request and the response.
|
timer
|
request_size
|
kong.service.<entity>.request.size
|
Tracks the size of the request in bytes.
|
counter
|
response_size
|
kong.service.<entity>.response.size
|
Tracks the size of the response in bytes.
|
counter
|
status_count
|
kong.service.<entity>.status.<status>
|
Counts the responses for each HTTP status code.
|
counter
|
upstream_latency
|
kong.service.<entity>.upstream_latency
|
Tracks the time in milliseconds the upstream took to process the request.
|
timer
|
kong_latency
|
kong.service.<entity>.kong_latency
|
Tracks the time in milliseconds AI Gateway spent processing the request itself.
|
timer
|
unique_users
|
kong.service.<entity>.user.uniques
|
Tracks the unique AI Consumers that made requests.
|
set
|
request_per_user
|
kong.service.<entity>.user.<consumer_identifier>.request.count
|
Counts the requests for each AI Consumer.
|
counter
|
status_count_per_user
|
kong.service.<entity>.user.<consumer_identifier>.status.<status>
|
Counts the responses for each HTTP status code and AI Consumer.
|
counter
|
status_count_per_workspace
|
kong.service.<entity>.workspace.<workspace_id>.status.<status>
|
Counts the responses for each HTTP status code, with a workspace ID in the name.
|
counter
|
shdict_usage
|
kong.node.<node_hostname>.shdict.<dictionary>.free_space
kong.node.<node_hostname>.shdict.<dictionary>.capacity
|
Tracks the free space and capacity of each shared memory dictionary on the data plane node, about once a minute.
|
gauge
|
When you set config.metrics, the Policy sends only the metrics in the list.
The stat_type field of each metric in config.metrics sets the metric type.
The Policy sends each type to the StatsD server as a type code:
|
Type
|
Code
|
counter
|
c
|
timer
|
ms
|
gauge
|
g
|
histogram
|
h
|
meter
|
m
|
set
|
s
|
Metrics of type counter or gauge require a sample_rate.
AI Gateway rejects the Policy when a counter or gauge metric doesn’t set one.
The Policy reports every request and appends the rate to the metric, for example kong.service.<entity>.request.count:1|c|@0.5, so your StatsD server can scale the counts.
For unique_users and status_count, the Policy ignores stat_type and sends a set and a counter.