wu-sheng commented on PR #808:
URL: https://github.com/apache/skywalking-java/pull/808#issuecomment-4604248966

   A few notes on the latest fix (commit `2219fe7e8d`):
   
   **1. `apm-sniffer/config/agent.config:371` — the query-length limit can't 
actually be configured.**
   `ConfigInitializer` derives the property key from the field name 
(`Plugin.SpringAi.RETRIEVAL_QUERY_LENGTH_LIMIT` → 
`plugin.springai.retrieval_query_length_limit`) and only binds when that exact 
key is present. The key here is `plugin.springai.retrieval_query`, which 
matches no field, so `RETRIEVAL_QUERY_LENGTH_LIMIT` stays at the hard-coded 
`1024` and can't be changed via `agent.config` or the `SW_...` env var. Suggest 
renaming to:
   ```
   
plugin.springai.retrieval_query_length_limit=${SW_PLUGIN_SPRINGAI_RETRIEVAL_QUERY_LENGTH_LIMIT:1024}
   ```
   (The sibling `collect_retrieval_query` / `collect_retrieval_documents` keys 
are fine.)
   
   **2. `SpringAiPluginConfig.java:88` — nit:** double space before `=` in 
`COLLECT_RETRIEVAL_DOCUMENTS  = false`.
   
   **3. `AbstractObservationVectorStoreInterceptor.java:82-86` — nit:** the 
truncation guard `limit > 0` means a value of `0` also collects the full query, 
i.e. `0` behaves the same as the documented `negative = no limit`. Fine if 
intentional (it's consistent with the chat interceptors), but `0` reads like it 
should mean "collect nothing".
   


-- 
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]

Reply via email to