Skip to content

Found docs updates needed from ADK python release v2.9.1 to v2.9.2 #2247

Description

@adk-bot

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions