janiussyafiq commented on code in PR #13659:
URL: https://github.com/apache/apisix/pull/13659#discussion_r3526215361
##########
docs/en/latest/plugins/prometheus.md:
##########
@@ -249,6 +249,63 @@ The `type` label distinguishes the kind of latency,
similar to `apisix_http_late
| request_type | traditional_http / ai_chat / ai_stream
|
| llm_model | For non-traditional_http requests, name of the llm_model
|
+### Labels for `apisix_ai_cache_hits_total`
+
+`apisix_ai_cache_hits_total` counts requests served from the
[`ai-cache`](./ai-cache.md) Plugin's cache, per serving layer.
+
+| Name | Description
|
+| ---------- |
-----------------------------------------------------------------------------------------------------------------------------
|
+| layer | Cache layer that served the hit: `exact` or `semantic`.
|
+| route_id | ID of the Route that the metric corresponds to. Default to
an empty string if a request does not match any Route. |
+| service_id | ID of the Service that the matched Route belongs to. Default
to an empty string if the matched Route does not belong to any Service. |
+| consumer | Name of the Consumer associated with a request. Default to an
empty string if no Consumer is associated with the request.
|
+| node | IP address of the upstream node. Empty for requests served from
the cache, which never reach the upstream.
|
+| request_type | traditional_http / ai_chat / ai_stream
|
+| request_llm_model | Model name requested by the client.
|
+| llm_model | Model name reported by the LLM response. Empty for
requests served from the cache, which never reach the upstream.
|
+
+### Labels for `apisix_ai_cache_misses_total`
+
+`apisix_ai_cache_misses_total` counts requests the [`ai-cache`](./ai-cache.md)
Plugin looked up but could not serve from the cache.
+
+| Name | Description
|
+| ---------- |
-----------------------------------------------------------------------------------------------------------------------------
|
+| route_id | ID of the Route that the metric corresponds to. Default to
an empty string if a request does not match any Route. |
+| service_id | ID of the Service that the matched Route belongs to. Default
to an empty string if the matched Route does not belong to any Service. |
+| consumer | Name of the Consumer associated with a request. Default to an
empty string if no Consumer is associated with the request.
|
+| node | IP address of the upstream node. Empty for requests served from
the cache, which never reach the upstream.
|
+| request_type | traditional_http / ai_chat / ai_stream
|
+| request_llm_model | Model name requested by the client.
|
+| llm_model | Model name reported by the LLM response. Empty for
requests served from the cache, which never reach the upstream.
|
Review Comment:
Since the requests is served from cache, meaning we never called the
upstream to get the response back hence empty. Should i reword this or still
shows the model neverthelesss?
##########
docs/en/latest/plugins/prometheus.md:
##########
@@ -249,6 +249,63 @@ The `type` label distinguishes the kind of latency,
similar to `apisix_http_late
| request_type | traditional_http / ai_chat / ai_stream
|
| llm_model | For non-traditional_http requests, name of the llm_model
|
+### Labels for `apisix_ai_cache_hits_total`
+
+`apisix_ai_cache_hits_total` counts requests served from the
[`ai-cache`](./ai-cache.md) Plugin's cache, per serving layer.
+
+| Name | Description
|
+| ---------- |
-----------------------------------------------------------------------------------------------------------------------------
|
+| layer | Cache layer that served the hit: `exact` or `semantic`.
|
+| route_id | ID of the Route that the metric corresponds to. Default to
an empty string if a request does not match any Route. |
+| service_id | ID of the Service that the matched Route belongs to. Default
to an empty string if the matched Route does not belong to any Service. |
+| consumer | Name of the Consumer associated with a request. Default to an
empty string if no Consumer is associated with the request.
|
+| node | IP address of the upstream node. Empty for requests served from
the cache, which never reach the upstream.
|
Review Comment:
Same problem as below?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]