These metrics use the kong.gen_ai.* namespace and capture Kong-specific AI observability data, including cost tracking, cache and RAG latency, and AWS Guardrails processing time.
To populate kong.gen_ai.llm.cost, define targets[].config.input_cost and targets[].config.output_cost in your AI Model configuration.
Cost of AI requests.
- Instrument unit:
{cost}
- Instrument type:
Sum
-
Attributes:
|
Attribute
|
Attribute description
|
gen_ai.provider.name
|
Name of the Gen AI provider.
|
gen_ai.request.model
|
Model name targeted by the request.
|
gen_ai.response.model
|
Model name reported by the provider in the response.
|
gen_ai.operation.name
|
Operation requested, such as chat or embeddings.
|
kong.gen_ai.cache.status
|
Cache status: hit or empty if not cached.
|
kong.gen_ai.vector_db
|
Vector database used for caching, such as redis.
|
kong.gen_ai.embeddings.provider
|
Embeddings provider used for caching.
|
kong.gen_ai.embeddings.model
|
Embeddings model used for caching.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.auth.consumer.name
|
Name of the authenticated AI Consumer.
|
kong.gen_ai.request.mode
|
Request mode: oneshot, stream, or realtime.
|
Time to fetch a response from the semantic cache.
- Instrument unit:
s
- Instrument type:
Histogram
-
Attributes:
|
Attribute
|
Attribute description
|
gen_ai.provider.name
|
Name of the Gen AI provider.
|
gen_ai.request.model
|
Model name targeted by the request.
|
gen_ai.response.model
|
Model name reported by the provider in the response.
|
gen_ai.operation.name
|
Operation requested, such as chat or embeddings.
|
kong.gen_ai.cache.status
|
Cache status: hit or empty if not cached.
|
kong.gen_ai.vector_db
|
Vector database used for caching, such as redis.
|
kong.gen_ai.embeddings.provider
|
Embeddings provider used for caching.
|
kong.gen_ai.embeddings.model
|
Embeddings model used for caching.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.auth.consumer.name
|
Name of the authenticated AI Consumer.
|
kong.gen_ai.request.mode
|
Request mode: oneshot, stream, or realtime.
|
Time to generate embeddings during cache operations.
- Instrument unit:
s
- Instrument type:
Histogram
-
Attributes:
|
Attribute
|
Attribute description
|
gen_ai.provider.name
|
Name of the Gen AI provider.
|
gen_ai.request.model
|
Model name targeted by the request.
|
gen_ai.response.model
|
Model name reported by the provider in the response.
|
gen_ai.operation.name
|
Operation requested, such as chat or embeddings.
|
kong.gen_ai.cache.status
|
Cache status: hit or empty if not cached.
|
kong.gen_ai.vector_db
|
Vector database used for caching, such as redis.
|
kong.gen_ai.embeddings.provider
|
Embeddings provider used for caching.
|
kong.gen_ai.embeddings.model
|
Embeddings model used for caching.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.auth.consumer.name
|
Name of the authenticated AI Consumer.
|
kong.gen_ai.request.mode
|
Request mode: oneshot, stream, or realtime.
|
Time to fetch data from a RAG source.
- Instrument unit:
s
- Instrument type:
Histogram
-
Attributes:
|
Attribute
|
Attribute description
|
gen_ai.provider.name
|
Name of the Gen AI provider.
|
gen_ai.request.model
|
Model name targeted by the request.
|
gen_ai.response.model
|
Model name reported by the provider in the response.
|
gen_ai.operation.name
|
Operation requested, such as chat or embeddings.
|
kong.gen_ai.cache.status
|
Cache status: hit or empty if not cached.
|
kong.gen_ai.vector_db
|
Vector database used for caching, such as redis.
|
kong.gen_ai.embeddings.provider
|
Embeddings provider used for caching.
|
kong.gen_ai.embeddings.model
|
Embeddings model used for caching.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.auth.consumer.name
|
Name of the authenticated AI Consumer.
|
kong.gen_ai.request.mode
|
Request mode: oneshot, stream, or realtime.
|
Time to generate embeddings for RAG operations.
- Instrument unit:
s
- Instrument type:
Histogram
-
Attributes:
|
Attribute
|
Attribute description
|
gen_ai.provider.name
|
Name of the Gen AI provider.
|
gen_ai.request.model
|
Model name targeted by the request.
|
gen_ai.response.model
|
Model name reported by the provider in the response.
|
gen_ai.operation.name
|
Operation requested, such as chat or embeddings.
|
kong.gen_ai.cache.status
|
Cache status: hit or empty if not cached.
|
kong.gen_ai.vector_db
|
Vector database used for caching, such as redis.
|
kong.gen_ai.embeddings.provider
|
Embeddings provider used for caching.
|
kong.gen_ai.embeddings.model
|
Embeddings model used for caching.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.auth.consumer.name
|
Name of the authenticated AI Consumer.
|
kong.gen_ai.request.mode
|
Request mode: oneshot, stream, or realtime.
|
Time for AWS Guardrails to process a request.
- Instrument unit:
s
- Instrument type:
Histogram
-
Attributes:
|
Attribute
|
Attribute description
|
kong.gen_ai.aws.guardrails.id
|
ID of the AWS Guardrails configuration.
|
kong.gen_ai.aws.guardrails.version
|
Version of the AWS Guardrails configuration.
|
kong.gen_ai.aws.guardrails.mode
|
Mode of the AWS Guardrails evaluation.
|
kong.gen_ai.aws.guardrails.region
|
AWS region of the Guardrails service.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.auth.consumer.name
|
Name of the authenticated AI Consumer.
|
Size of the MCP response body in bytes.
- Instrument unit:
By
- Instrument type:
Histogram
-
Attributes:
|
Attribute
|
Attribute description
|
kong.service.name
|
Name of the Gateway Service.
|
kong.route.name
|
Name of the Route.
|
kong.workspace.name
|
Name of the Workspace.
|
mcp.method.name
|
MCP method name, such as tools/call.
|
gen_ai.tool.name
|
Name of the MCP tool invoked.
|
Number of MCP request errors.
- Instrument unit:
{error}
- Instrument type:
Sum
-
Attributes:
|
Attribute
|
Attribute description
|
kong.service.name
|
Name of the Gateway Service.
|
kong.route.name
|
Name of the Route.
|
kong.workspace.name
|
Name of the Workspace.
|
mcp.method.name
|
MCP method name, such as tools/call.
|
gen_ai.tool.name
|
Name of the MCP tool invoked.
|
error.type
|
Type of error that occurred.
|
Number of MCP requests allowed by ACL rules.
- Instrument unit:
{request}
- Instrument type:
Sum
-
Attributes:
|
Attribute
|
Attribute description
|
kong.service.name
|
Name of the Gateway Service.
|
kong.route.name
|
Name of the Route.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.gen_ai.mcp.primitive
|
MCP primitive type, such as tool.
|
kong.gen_ai.mcp.primitive_name
|
Name of the MCP primitive.
|
Number of MCP requests denied by ACL rules.
- Instrument unit:
{request}
- Instrument type:
Sum
-
Attributes:
|
Attribute
|
Attribute description
|
kong.service.name
|
Name of the Gateway Service.
|
kong.route.name
|
Name of the Route.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.gen_ai.mcp.primitive
|
MCP primitive type, such as tool.
|
kong.gen_ai.mcp.primitive_name
|
Name of the MCP primitive.
|
Total number of A2A requests.
- Instrument unit:
{request}
- Instrument type:
Sum
-
Attributes:
|
Attribute
|
Attribute description
|
kong.service.name
|
Name of the Gateway Service.
|
kong.route.name
|
Name of the Route.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.gen_ai.a2a.method
|
A2A method name.
|
kong.gen_ai.a2a.binding
|
A2A binding type.
|
Duration of an A2A request in seconds.
- Instrument unit:
s
- Instrument type:
Histogram
-
Attributes:
|
Attribute
|
Attribute description
|
kong.service.name
|
Name of the Gateway Service.
|
kong.route.name
|
Name of the Route.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.gen_ai.a2a.method
|
A2A method name.
|
kong.gen_ai.a2a.binding
|
A2A binding type.
|
Size of the A2A response body in bytes.
- Instrument unit:
By
- Instrument type:
Histogram
-
Attributes:
|
Attribute
|
Attribute description
|
kong.service.name
|
Name of the Gateway Service.
|
kong.route.name
|
Name of the Route.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.gen_ai.a2a.method
|
A2A method name.
|
kong.gen_ai.a2a.binding
|
A2A binding type.
|
Time to first byte for A2A streaming responses in seconds.
- Instrument unit:
s
- Instrument type:
Histogram
-
Attributes:
|
Attribute
|
Attribute description
|
kong.service.name
|
Name of the Gateway Service.
|
kong.route.name
|
Name of the Route.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.gen_ai.a2a.method
|
A2A method name.
|
kong.gen_ai.a2a.binding
|
A2A binding type.
|
Number of A2A request errors.
- Instrument unit:
{error}
- Instrument type:
Sum
-
Attributes:
|
Attribute
|
Attribute description
|
kong.service.name
|
Name of the Gateway Service.
|
kong.route.name
|
Name of the Route.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.gen_ai.a2a.method
|
A2A method name.
|
kong.gen_ai.a2a.binding
|
A2A binding type.
|
kong.gen_ai.a2a.error.type
|
Type of the A2A error.
|
Number of A2A task state transitions.
- Instrument unit:
{state}
- Instrument type:
Sum
-
Attributes:
|
Attribute
|
Attribute description
|
kong.service.name
|
Name of the Gateway Service.
|
kong.route.name
|
Name of the Route.
|
kong.workspace.name
|
Name of the Workspace.
|
kong.gen_ai.a2a.task.state
|
Task state, such as completed, failed, or in_progress.
|