Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/observability/cloud-trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ async def main():
)

user_content = Content(
role="user", parts=[Part(text="what's weather in paris?")]
role="user", parts=[Part(text="what\'s weather in paris?")]
)

final_response_content = "No response"
Expand Down Expand Up @@ -255,6 +255,14 @@ If you click on one of the traces, you will see the waterfall view of the detail

![cloud-trace](../assets/cloud-trace3.png)

## Privacy and Data Capture

You can control the logging of sensitive content in traces using environment variables. This is important for privacy and compliance. ADK tracing aligns with OpenTelemetry Semantic Conventions for Generative AI.

- **ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS**: Set this environment variable to 'false' or '0' to disable capturing potentially personally identifiable information (PII) such as LLM requests, LLM responses, and tool arguments in ADK spans. By default, this is set to 'true'.

- **OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT**: Set this environment variable to 'true' or '1' to enable logging of prompt and response content in spans instrumented by the Generative AI instrumentation.

## Resources

- [Google Cloud Trace Documentation](https://cloud.google.com/trace)
Loading