From 9587cb0dfb220697720f593ba7e3f228a326f1d2 Mon Sep 17 00:00:00 2001 From: Christian Tzolov Date: Thu, 22 Aug 2024 09:49:32 +0200 Subject: [PATCH] Add ChatClient input data section to Observability docs --- .../antora/modules/ROOT/pages/observabilty/index.adoc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/observabilty/index.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/observabilty/index.adoc index c1bf3581d..5be695a2d 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/observabilty/index.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/observabilty/index.adoc @@ -33,6 +33,17 @@ NOTE: Low cardinality keys will be added to metrics and traces, while high cardi |`spring.ai.chat.client.user.text` |Chat client user text. |=== +=== ChatClient input data + +The ChatClient input data is typically too big to be included in an observation as span attributes. +The preferred way to store large data it is as span events, which are supported by OpenTelemetry but not yet surfaced through the Micrometer APIs. +Spring AI supports storing these fields as events in OpenTelemetry and will provide a more general event based solution once the issue https://github.com/micrometer-metrics/micrometer/issues/5238 is resolved. + +[cols="6,3,1"] +|==== +| Property | Description | Default +| `spring.ai.chat.client.observations.include-input` | Enables the inclusion of the input content in the observations. This brings the risk of exposing sensitive or private information. Please, be careful! | `false` +|==== === ChatClient Advisors