From a1df97eb65e90538968d3ce3fd4cc7333a376560 Mon Sep 17 00:00:00 2001 From: Juan Carlos Radillo Diaz Date: Fri, 21 Aug 2026 22:51:54 +0000 Subject: [PATCH 1/5] adding details on data capture --- docs/integrations/cloud-trace.md | 24 +++++++++++++ docs/observability/traces.md | 60 +++++++++++++++++++++++++++++++- 2 files changed, 83 insertions(+), 1 deletion(-) diff --git a/docs/integrations/cloud-trace.md b/docs/integrations/cloud-trace.md index acfd41f472..a4ab5795cf 100644 --- a/docs/integrations/cloud-trace.md +++ b/docs/integrations/cloud-trace.md @@ -248,6 +248,30 @@ filter and analyze your agent's behavior: - `gcp.vertex.agent.invocation_id`: The unique ID of the invocation. - `gcp.vertex.agent.event_id`: The ID of the specific event. - `gen_ai.conversation.id`: The session ID. +- `gcp.vertex.agent.llm_request`: Serialized LLM request containing prompt text and configuration. +- `gcp.vertex.agent.llm_response`: Serialized LLM response containing model output. +- `gcp.vertex.agent.tool_call_args`: Serialized arguments passed to tool calls. +- `gcp.vertex.agent.tool_response`: Serialized result returned by the tool. +- `gcp.vertex.agent.data`: Serialized data payloads sent to the agent. + +### Data privacy and message content in Cloud Trace + +To protect sensitive information and avoid capturing Personally Identifiable Information (PII) in production: + +- **Agent Engine deployment default:** When deploying an agent to Vertex AI Agent Engine with `adk deploy agent_engine --otel_to_cloud`, ADK automatically injects `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false` into the environment unless explicitly specified in `.env`. +- **Redacted placeholders:** When content capture in spans is disabled (`false`), payload attributes (`gcp.vertex.agent.llm_request`, `gcp.vertex.agent.llm_response`, `gcp.vertex.agent.tool_call_args`, `gcp.vertex.agent.tool_response`, and `gcp.vertex.agent.data`) are populated with empty JSON string placeholders (`"{}"`) in Cloud Trace spans. +- **Enabling payloads for debugging:** If you need full request and response payloads in Cloud Trace during development or testing, you can explicitly enable them via environment variables: + + ```bash + export ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=true + ``` + + Or opt into the standard OpenTelemetry GenAI semantic conventions: + + ```bash + export OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental + export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=SPAN_ONLY + ``` ## Resources diff --git a/docs/observability/traces.md b/docs/observability/traces.md index fb7ed761cd..af0fa49dfb 100644 --- a/docs/observability/traces.md +++ b/docs/observability/traces.md @@ -56,10 +56,37 @@ To enable trace export to Google Cloud Trace, use the `--otel_to_cloud` flag: adk web --otel_to_cloud path/to/your/agents_dir ``` -### Programmatic traces export +#### Capture message content and payloads in spans + +By default in local Python development, ADK records prompts, LLM responses, tool arguments, and tool responses as JSON attributes on spans under the `gcp.vertex.agent.*` namespace (`gcp.vertex.agent.llm_request`, `gcp.vertex.agent.llm_response`, `gcp.vertex.agent.tool_call_args`, `gcp.vertex.agent.tool_response`, and `gcp.vertex.agent.data`). + +To prevent sensitive data or PII from being captured on these spans, set `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false`: + +```bash +export ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false +adk web path/to/your/agents_dir +``` + +When set to `false` (or `0`), these payload attributes are replaced with empty JSON string placeholders (`"{}"`). + +Additionally, you can configure prompt and response message content on spans following the OpenTelemetry GenAI Semantic Conventions via `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT`: + +```bash +export OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental +export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=SPAN_ONLY +``` + +The available values are `NO_CONTENT` (default), `EVENT_ONLY`, `SPAN_ONLY`, and `SPAN_AND_EVENT`. Capturing content on spans requires `SPAN_ONLY` or `SPAN_AND_EVENT`, along with opting into experimental GenAI semantic conventions via `OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental`. + +!!! warning + Span content capture records raw user inputs, model outputs, and tool call arguments. In production environments, ensure appropriate data governance policies are in place, or disable span content via `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false` (which is set automatically by `adk deploy agent_engine --otel_to_cloud`). + +## Programmatic traces export You can also configure trace export programmatically in your application code. +### Python programmatic setup + #### OTLP export setup To enable tracing and export spans to an OpenTelemetry Collector programmatically: @@ -91,6 +118,37 @@ os.environ["OTEL_RESOURCE_ATTRIBUTES"] = "key1=value1,key2=value2" maybe_set_otel_providers([gcp_exporters]) ``` +#### Capture prompt and span content programmatically + +You can toggle span payload capture globally via environment variables: + +```python +import os + +# Disable custom ADK payload attributes on spans (sets attributes to "{}") +os.environ["ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS"] = "false" + +# Or configure OpenTelemetry GenAI span message capturing +os.environ["OTEL_SEMCONV_STABILITY_OPT_IN"] = "gen_ai_latest_experimental" +os.environ["OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT"] = "SPAN_ONLY" +``` + +To configure content capture per invocation rather than process-wide, set `RunConfig.telemetry`: + +```python +from google.adk.agents.run_config import RunConfig +from google.adk.telemetry import ContentCapturingMode, TelemetryConfig + +run_config = RunConfig( + telemetry=TelemetryConfig( + capture_message_content=ContentCapturingMode.SPAN_ONLY, + genai_semconv_stability_opt_in="experimental", + ), +) +``` + +Setting `capture_message_content` to `SPAN_ONLY` or `SPAN_AND_EVENT` enables content capture on both experimental OpenTelemetry spans and ADK spans, while `EVENT_ONLY` or `NO_CONTENT` redacts span payloads. + ### Kotlin programmatic setup In Kotlin, ADK automatically uses the `GlobalOpenTelemetry` instance to export traces. You should configure your OpenTelemetry SDK before starting the agent. From c2d6afea7663995010377597dcc6455e22646400 Mon Sep 17 00:00:00 2001 From: Juan Carlos Radillo Diaz Date: Mon, 24 Aug 2026 19:40:36 +0000 Subject: [PATCH 2/5] simplified update --- docs/integrations/cloud-trace.md | 53 ++++++++++++---------------- docs/observability/traces.md | 59 +------------------------------- 2 files changed, 23 insertions(+), 89 deletions(-) diff --git a/docs/integrations/cloud-trace.md b/docs/integrations/cloud-trace.md index a4ab5795cf..4ec34e07c0 100644 --- a/docs/integrations/cloud-trace.md +++ b/docs/integrations/cloud-trace.md @@ -241,37 +241,28 @@ process, similar to the trace view in the local ADK web UI. ### Captured attributes -ADK automatically enriches traces with the following attributes to help you -filter and analyze your agent's behavior: - -- `gen_ai.agent.name`: The name of the agent being executed. -- `gcp.vertex.agent.invocation_id`: The unique ID of the invocation. -- `gcp.vertex.agent.event_id`: The ID of the specific event. -- `gen_ai.conversation.id`: The session ID. -- `gcp.vertex.agent.llm_request`: Serialized LLM request containing prompt text and configuration. -- `gcp.vertex.agent.llm_response`: Serialized LLM response containing model output. -- `gcp.vertex.agent.tool_call_args`: Serialized arguments passed to tool calls. -- `gcp.vertex.agent.tool_response`: Serialized result returned by the tool. -- `gcp.vertex.agent.data`: Serialized data payloads sent to the agent. - -### Data privacy and message content in Cloud Trace - -To protect sensitive information and avoid capturing Personally Identifiable Information (PII) in production: - -- **Agent Engine deployment default:** When deploying an agent to Vertex AI Agent Engine with `adk deploy agent_engine --otel_to_cloud`, ADK automatically injects `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false` into the environment unless explicitly specified in `.env`. -- **Redacted placeholders:** When content capture in spans is disabled (`false`), payload attributes (`gcp.vertex.agent.llm_request`, `gcp.vertex.agent.llm_response`, `gcp.vertex.agent.tool_call_args`, `gcp.vertex.agent.tool_response`, and `gcp.vertex.agent.data`) are populated with empty JSON string placeholders (`"{}"`) in Cloud Trace spans. -- **Enabling payloads for debugging:** If you need full request and response payloads in Cloud Trace during development or testing, you can explicitly enable them via environment variables: - - ```bash - export ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=true - ``` - - Or opt into the standard OpenTelemetry GenAI semantic conventions: - - ```bash - export OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental - export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=SPAN_ONLY - ``` +The Agent Development Kit (ADK) enriches traces with telemetry attributes to help you filter, monitor, and analyze agent behavior. + +| Attribute | Description | +| :--- | :--- | +| `gen_ai.agent.name` | The name of the agent being executed. | +| `gcp.vertex.agent.invocation_id` | Unique ID of the invocation. | +| `gcp.vertex.agent.event_id` | ID of the specific event. | +| `gen_ai.conversation.id` | The session or conversation ID. | +| `gcp.vertex.agent.llm_request` | Serialized LLM request containing prompt text and configuration. | +| `gcp.vertex.agent.llm_response` | Serialized LLM response containing model output. | +| `gcp.vertex.agent.tool_call_args` | Serialized arguments passed to tool calls. | +| `gcp.vertex.agent.tool_response` | Serialized result returned by the tool. | +| `gcp.vertex.agent.data` | Serialized data payloads sent to the agent. | + +### Data privacy and payload redaction + +To prevent exposing sensitive data and Personally Identifiable Information (PII) in production: + +- **Deployment default:** When deploying to Vertex AI Agent Engine, ADK sets `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='false'` by default. +- **Redacted payloads:** When content capture in spans is disabled (`'false'` or `'0'`), payload attributes (`llm_request`, `llm_response`, `tool_call_args`, `tool_response`, and `data`) are replaced with empty JSON placeholders (`"{}"`) in Cloud Trace. +- **Enabling capture:** To capture full payloads for local testing or debugging, explicitly set `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='true'` in your `.env` file or environment variables. +- **OpenTelemetry message logging:** Set `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT='true'` (or `'1'`) to enable logging of prompt and response content in spans instrumented by the Generative AI instrumentation. ## Resources diff --git a/docs/observability/traces.md b/docs/observability/traces.md index af0fa49dfb..b85a4ae1b7 100644 --- a/docs/observability/traces.md +++ b/docs/observability/traces.md @@ -56,37 +56,10 @@ To enable trace export to Google Cloud Trace, use the `--otel_to_cloud` flag: adk web --otel_to_cloud path/to/your/agents_dir ``` -#### Capture message content and payloads in spans - -By default in local Python development, ADK records prompts, LLM responses, tool arguments, and tool responses as JSON attributes on spans under the `gcp.vertex.agent.*` namespace (`gcp.vertex.agent.llm_request`, `gcp.vertex.agent.llm_response`, `gcp.vertex.agent.tool_call_args`, `gcp.vertex.agent.tool_response`, and `gcp.vertex.agent.data`). - -To prevent sensitive data or PII from being captured on these spans, set `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false`: - -```bash -export ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false -adk web path/to/your/agents_dir -``` - -When set to `false` (or `0`), these payload attributes are replaced with empty JSON string placeholders (`"{}"`). - -Additionally, you can configure prompt and response message content on spans following the OpenTelemetry GenAI Semantic Conventions via `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT`: - -```bash -export OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental -export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=SPAN_ONLY -``` - -The available values are `NO_CONTENT` (default), `EVENT_ONLY`, `SPAN_ONLY`, and `SPAN_AND_EVENT`. Capturing content on spans requires `SPAN_ONLY` or `SPAN_AND_EVENT`, along with opting into experimental GenAI semantic conventions via `OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental`. - -!!! warning - Span content capture records raw user inputs, model outputs, and tool call arguments. In production environments, ensure appropriate data governance policies are in place, or disable span content via `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false` (which is set automatically by `adk deploy agent_engine --otel_to_cloud`). - -## Programmatic traces export +### Programmatic traces export You can also configure trace export programmatically in your application code. -### Python programmatic setup - #### OTLP export setup To enable tracing and export spans to an OpenTelemetry Collector programmatically: @@ -118,36 +91,6 @@ os.environ["OTEL_RESOURCE_ATTRIBUTES"] = "key1=value1,key2=value2" maybe_set_otel_providers([gcp_exporters]) ``` -#### Capture prompt and span content programmatically - -You can toggle span payload capture globally via environment variables: - -```python -import os - -# Disable custom ADK payload attributes on spans (sets attributes to "{}") -os.environ["ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS"] = "false" - -# Or configure OpenTelemetry GenAI span message capturing -os.environ["OTEL_SEMCONV_STABILITY_OPT_IN"] = "gen_ai_latest_experimental" -os.environ["OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT"] = "SPAN_ONLY" -``` - -To configure content capture per invocation rather than process-wide, set `RunConfig.telemetry`: - -```python -from google.adk.agents.run_config import RunConfig -from google.adk.telemetry import ContentCapturingMode, TelemetryConfig - -run_config = RunConfig( - telemetry=TelemetryConfig( - capture_message_content=ContentCapturingMode.SPAN_ONLY, - genai_semconv_stability_opt_in="experimental", - ), -) -``` - -Setting `capture_message_content` to `SPAN_ONLY` or `SPAN_AND_EVENT` enables content capture on both experimental OpenTelemetry spans and ADK spans, while `EVENT_ONLY` or `NO_CONTENT` redacts span payloads. ### Kotlin programmatic setup From 516a26167779e998b6fb43e24ce85c2cbd3119c9 Mon Sep 17 00:00:00 2001 From: Juan Carlos Radillo Diaz Date: Mon, 24 Aug 2026 20:15:54 +0000 Subject: [PATCH 3/5] note added --- docs/integrations/cloud-trace.md | 8 ++++++-- docs/observability/traces.md | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/integrations/cloud-trace.md b/docs/integrations/cloud-trace.md index 4ec34e07c0..b2678fc661 100644 --- a/docs/integrations/cloud-trace.md +++ b/docs/integrations/cloud-trace.md @@ -259,10 +259,14 @@ The Agent Development Kit (ADK) enriches traces with telemetry attributes to hel To prevent exposing sensitive data and Personally Identifiable Information (PII) in production: -- **Deployment default:** When deploying to Vertex AI Agent Engine, ADK sets `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='false'` by default. +- **Default behavior:** By default, ADK sets `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='false'` to prevent capturing message content in trace spans. - **Redacted payloads:** When content capture in spans is disabled (`'false'` or `'0'`), payload attributes (`llm_request`, `llm_response`, `tool_call_args`, `tool_response`, and `data`) are replaced with empty JSON placeholders (`"{}"`) in Cloud Trace. - **Enabling capture:** To capture full payloads for local testing or debugging, explicitly set `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='true'` in your `.env` file or environment variables. -- **OpenTelemetry message logging:** Set `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT='true'` (or `'1'`) to enable logging of prompt and response content in spans instrumented by the Generative AI instrumentation. +- **OpenTelemetry message logging:** Set `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT='true'` (or `'1'`) to enable logging of prompt and response content in spans generated by the OpenTelemetry Generative AI instrumentation. + +!!! note + * **Agent orchestration layer (`ADK_*`):** Use `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS` to control payload redaction in ADK-specific agent attributes (such as `gcp.vertex.agent.llm_request` and `tool_call_args`). + * **Model telemetry layer (`OTEL_*`):** Use `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` to capture raw prompt and response payloads in underlying OpenTelemetry GenAI spans. ## Resources diff --git a/docs/observability/traces.md b/docs/observability/traces.md index b85a4ae1b7..fb7ed761cd 100644 --- a/docs/observability/traces.md +++ b/docs/observability/traces.md @@ -91,7 +91,6 @@ os.environ["OTEL_RESOURCE_ATTRIBUTES"] = "key1=value1,key2=value2" maybe_set_otel_providers([gcp_exporters]) ``` - ### Kotlin programmatic setup In Kotlin, ADK automatically uses the `GlobalOpenTelemetry` instance to export traces. You should configure your OpenTelemetry SDK before starting the agent. From 012fe2554651521c01808394ad1fc146f38e49c0 Mon Sep 17 00:00:00 2001 From: Juan Carlos Radillo Diaz Date: Mon, 24 Aug 2026 21:06:36 +0000 Subject: [PATCH 4/5] fixing inconsistencies --- docs/integrations/cloud-trace.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/integrations/cloud-trace.md b/docs/integrations/cloud-trace.md index b2678fc661..bf54e0d17b 100644 --- a/docs/integrations/cloud-trace.md +++ b/docs/integrations/cloud-trace.md @@ -259,14 +259,14 @@ The Agent Development Kit (ADK) enriches traces with telemetry attributes to hel To prevent exposing sensitive data and Personally Identifiable Information (PII) in production: -- **Default behavior:** By default, ADK sets `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='false'` to prevent capturing message content in trace spans. -- **Redacted payloads:** When content capture in spans is disabled (`'false'` or `'0'`), payload attributes (`llm_request`, `llm_response`, `tool_call_args`, `tool_response`, and `data`) are replaced with empty JSON placeholders (`"{}"`) in Cloud Trace. +- **Deployment default:** When deploying an agent with `adk deploy agent_engine --otel_to_cloud` (or `--trace_to_cloud`), ADK automatically sets `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='false'` to prevent capturing message content in trace spans. +- **Redacted payloads:** When content capture in spans is disabled (`'false'` or `'0'`), payload attributes (`gcp.vertex.agent.llm_request`, `gcp.vertex.agent.llm_response`, `gcp.vertex.agent.tool_call_args`, `gcp.vertex.agent.tool_response`, and `gcp.vertex.agent.data`) are replaced with empty JSON string placeholders (`"{}"`) in Cloud Trace. - **Enabling capture:** To capture full payloads for local testing or debugging, explicitly set `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='true'` in your `.env` file or environment variables. -- **OpenTelemetry message logging:** Set `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT='true'` (or `'1'`) to enable logging of prompt and response content in spans generated by the OpenTelemetry Generative AI instrumentation. +- **OpenTelemetry message capturing:** Set `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT='true'` (or `'1'`) to enable logging of prompt and response content in OpenTelemetry events. !!! note - * **Agent orchestration layer (`ADK_*`):** Use `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS` to control payload redaction in ADK-specific agent attributes (such as `gcp.vertex.agent.llm_request` and `tool_call_args`). - * **Model telemetry layer (`OTEL_*`):** Use `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` to capture raw prompt and response payloads in underlying OpenTelemetry GenAI spans. + * **Agent orchestration layer (`ADK`):** Use `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS` to control payload redaction in ADK-specific agent attributes (such as `gcp.vertex.agent.llm_request` and `gcp.vertex.agent.tool_call_args`). + * **Model telemetry layer (`OTEL`):** Use `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` to capture raw prompt and response payloads in underlying OpenTelemetry GenAI spans or log records. ## Resources From 5cc8e06dc040b28a025828fe4a6815c52da6356b Mon Sep 17 00:00:00 2001 From: Juan Carlos Radillo Diaz Date: Thu, 27 Aug 2026 22:40:45 +0000 Subject: [PATCH 5/5] updates on request --- docs/integrations/cloud-trace.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/integrations/cloud-trace.md b/docs/integrations/cloud-trace.md index bf54e0d17b..4bbf5f68e4 100644 --- a/docs/integrations/cloud-trace.md +++ b/docs/integrations/cloud-trace.md @@ -119,7 +119,7 @@ agent using the ADK CLI. adk deploy agent_engine \ --project=$GOOGLE_CLOUD_PROJECT \ --region=$GOOGLE_CLOUD_LOCATION \ - --trace_to_cloud \ + --otel_to_cloud \ $AGENT_PATH ``` @@ -249,6 +249,7 @@ The Agent Development Kit (ADK) enriches traces with telemetry attributes to hel | `gcp.vertex.agent.invocation_id` | Unique ID of the invocation. | | `gcp.vertex.agent.event_id` | ID of the specific event. | | `gen_ai.conversation.id` | The session or conversation ID. | +| `gcp.vertex.agent.session_id` | The session ID associated with the agent invocation context. | | `gcp.vertex.agent.llm_request` | Serialized LLM request containing prompt text and configuration. | | `gcp.vertex.agent.llm_response` | Serialized LLM response containing model output. | | `gcp.vertex.agent.tool_call_args` | Serialized arguments passed to tool calls. | @@ -259,8 +260,8 @@ The Agent Development Kit (ADK) enriches traces with telemetry attributes to hel To prevent exposing sensitive data and Personally Identifiable Information (PII) in production: -- **Deployment default:** When deploying an agent with `adk deploy agent_engine --otel_to_cloud` (or `--trace_to_cloud`), ADK automatically sets `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='false'` to prevent capturing message content in trace spans. -- **Redacted payloads:** When content capture in spans is disabled (`'false'` or `'0'`), payload attributes (`gcp.vertex.agent.llm_request`, `gcp.vertex.agent.llm_response`, `gcp.vertex.agent.tool_call_args`, `gcp.vertex.agent.tool_response`, and `gcp.vertex.agent.data`) are replaced with empty JSON string placeholders (`"{}"`) in Cloud Trace. +- **Deployment default:** When deploying with `adk deploy agent_engine --otel_to_cloud`, ADK automatically sets `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='false'` (unless already defined in `.env`). For other targets like Cloud Run or GKE, set this variable explicitly. +- **Redacted payloads:** When content capture in spans is disabled (`'false'` or `'0'`), payload attributes (`gcp.vertex.agent.llm_request`, `gcp.vertex.agent.llm_response`, `gcp.vertex.agent.tool_call_args`, `gcp.vertex.agent.tool_response`, and `gcp.vertex.agent.data`) are replaced with placeholder values (such as `"{}"` or `"N/A"`) in Cloud Trace. - **Enabling capture:** To capture full payloads for local testing or debugging, explicitly set `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS='true'` in your `.env` file or environment variables. - **OpenTelemetry message capturing:** Set `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT='true'` (or `'1'`) to enable logging of prompt and response content in OpenTelemetry events.