Compare link: google/adk-python@v2.9.1...v2.9.2
1. Document environment-specific log routing behavior for Cloud Logging exporter
Doc file: docs/observability/logging.md
Current state:
os.environ["OTEL_SERVICE_NAME"] = "your-adk-agent"
os.environ["OTEL_RESOURCE_ATTRIBUTES"] = "key1=value1,key2=value2"
maybe_set_otel_providers([gcp_exporters])
### Kotlin programmatic setup
Proposed Change:
os.environ["OTEL_SERVICE_NAME"] = "your-adk-agent"
os.environ["OTEL_RESOURCE_ATTRIBUTES"] = "key1=value1,key2=value2"
maybe_set_otel_providers([gcp_exporters])
!!! note
When running outside of Vertex AI Agent Engine, the Google Cloud Logging exporter preserves the OpenTelemetry event name in the log record. This allows Cloud Logging to route records to distinct logs named after each event type, making it easier to integrate with sinks like BigQuery tables. On Vertex AI Agent Engine, this behavior is suppressed to group all records into a single log pipeline.
### Kotlin programmatic setup
Reasoning:
The underlying logic in google_cloud.py changed to only drop record.event_name when running on Vertex AI Agent Engine (identified by GOOGLE_CLOUD_AGENT_ENGINE_ID). Everywhere else, it is now preserved so that Cloud Logging can create event-named logs and correctly route them to sinks. Users configuring GCP export setup should be aware of this environment-dependent behavior.
Reference: src/google/adk/telemetry/google_cloud.py
Compare link: google/adk-python@v2.9.1...v2.9.2
1. Document environment-specific log routing behavior for Cloud Logging exporter
Doc file: docs/observability/logging.md
Current state:
Proposed Change:
Reasoning:
The underlying logic in
google_cloud.pychanged to only droprecord.event_namewhen running on Vertex AI Agent Engine (identified byGOOGLE_CLOUD_AGENT_ENGINE_ID). Everywhere else, it is now preserved so that Cloud Logging can create event-named logs and correctly route them to sinks. Users configuring GCP export setup should be aware of this environment-dependent behavior.Reference: src/google/adk/telemetry/google_cloud.py