Skip to content

Commit 339afdf

Browse files
committed
fix
1 parent a4994a5 commit 339afdf

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

apm-sniffer/apm-sdk-plugin/spring-plugins/spring-ai-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/ai/v1/ChatModelCallInterceptor.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,6 @@ private void collectPrompt(AbstractSpan span, Object[] allArguments) {
155155
return;
156156
}
157157

158-
String promptText = prompt.getContents();
159-
if (promptText == null) {
160-
return;
161-
}
162-
163158
InputMessages inputMessages = InputMessages.fromPrompt(prompt);
164159
String inputMessagesJson = inputMessages.toJson();
165160
int limit = SpringAiPluginConfig.Plugin.SpringAi.INPUT_MESSAGES_LENGTH_LIMIT;

apm-sniffer/config/agent.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,10 @@ plugin.solon.http_body_length_threshold=${SW_PLUGIN_SOLON_HTTP_BODY_LENGTH_THRES
339339
plugin.caffeine.operation_mapping_write=${SW_PLUGIN_CAFFEINE_OPERATION_MAPPING_WRITE:put,putAll,remove,clear}
340340
# Specify which command should be converted to read operation
341341
plugin.caffeine.operation_mapping_read=${SW_PLUGIN_CAFFEINE_OPERATION_MAPPING_READ:getIfPresent,getAllPresent,computeIfAbsent}
342-
# Whether to collect the prompt content (input text) of the GenAI request.
343-
plugin.springai.collect_prompt=${SW_PLUGIN_SPRINGAI_COLLECT_PROMPT:false}
344-
# Whether to collect the completion content (output text) of the GenAI response.
345-
plugin.springai.collect_completion=${SW_PLUGIN_SPRINGAI_COLLECT_COMPLETION:false}
342+
# Whether to collect the input messages of the GenAI request.
343+
plugin.springai.collect_input_messages=${SW_PLUGIN_SPRINGAI_COLLECT_INPUT_MESSAGES:false}
344+
# Whether to collect the output messages of the GenAI response.
345+
plugin.springai.collect_output_messages=${SW_PLUGIN_SPRINGAI_COLLECT_OUTPUT_MESSAGES:false}
346346
# The maximum characters of the collected prompt content.
347347
# If the content exceeds this limit, it will be truncated.
348348
# Use a negative value to represent no limit, but be aware this could cause OOM.

0 commit comments

Comments
 (0)