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.
Cost of AI requests. To populate this metric, define model.options.input_cost and model.options.output_cost in the AI Proxy or AI Proxy Advanced plugin configuration.
-
Type: Counter
-
Unit:
{cost}
|
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 Consumer.
|
kong.gen_ai.request.mode
|
Request mode: oneshot, stream, or realtime.
|
Time to fetch a response from the semantic cache.
-
Type: Histogram
-
Unit:
s (seconds)
Attributes: Same as kong.gen_ai.llm.cost.
Time to generate embeddings during cache operations.
-
Type: Histogram
-
Unit:
s (seconds)
Attributes: Same as kong.gen_ai.llm.cost.
Time to fetch data from a RAG (Retrieval-Augmented Generation) source.
-
Type: Histogram
-
Unit:
s (seconds)
Attributes: Same as kong.gen_ai.llm.cost.
Time to generate embeddings for RAG operations.
-
Type: Histogram
-
Unit:
s (seconds)
Attributes: Same as kong.gen_ai.llm.cost.
Time for AWS Guardrails to process a request.
-
Type: Histogram
-
Unit:
s (seconds)
|
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 Consumer.
|