Add Google ADK sample agent A365 observability wiring (PoC)#326
Add Google ADK sample agent A365 observability wiring (PoC)#326evanmitchellgithub wants to merge 6 commits into
Conversation
Span remap + token caching + Cloud Run deploy scaffolding for routing Google ADK agent telemetry through the Agent 365 observability pipeline.
Dependency ReviewThe following issues were found:
License Issuespython/google-adk/sample-agent/requirements.txt
OpenSSF ScorecardScorecard details
Scanned Files
|
- Delete debug_probe.py (insecure TLS probe flagged by CodeQL) - Strip /debug/otlp-probe route and forced DEBUG logger from main.py - Strip _probe_export_transport TLS diagnostic from token_cache.py - Bump cryptography 48.0.0 -> 49.0.0 (OpenSSL wheel advisory) - Bump starlette 1.2.1 -> 1.3.1 (request.form DoS advisory)
|
@microsoft-github-policy-service agree company="Microsoft" |
There was a problem hiding this comment.
⚠️ Not ready to approve
A new Python file is missing the required license header, and the new process-wide token cache needs thread-safety for background exporter access.
Pull request overview
This PR extends the python/google-adk/sample-agent to route Google ADK/OpenTelemetry telemetry through the Agent 365 observability pipeline by adding a span operation-name remap, wiring exporter authentication via a per-turn token cache, and providing Cloud Run deployment scaffolding for a PoC setup.
Changes:
- Add a process-wide agentic token cache + resolver to authenticate A365 span export.
- Remap Google GenAI/ADK inference spans to an A365-accepted operation name (
chat) during export. - Add Cloud Run deployment helper files (Procfile,
.gcloudignore,.python-version, PowerShell deploy script) and pinned runtime dependencies.
File summaries
| File | Description |
|---|---|
| python/google-adk/sample-agent/token_cache.py | Adds per-(tenant,agent) token caching and a resolver for A365 exporter auth. |
| python/google-adk/sample-agent/observability_remap.py | Registers a span enricher that remaps ADK/GenAI inference spans to chat. |
| python/google-adk/sample-agent/main.py | Wires token resolver + remap registration into observability configure(). |
| python/google-adk/sample-agent/agent.py | Adds richer baggage dimensions and caches an observability-scoped token per authenticated turn. |
| python/google-adk/sample-agent/requirements.txt | Introduces pinned dependencies for Cloud Run/pip buildpack deployment. |
| python/google-adk/sample-agent/Procfile | Configures Cloud Run buildpack start command (python main.py). |
| python/google-adk/sample-agent/deploy-cloudrun.ps1 | Adds Cloud Run deployment automation and env-var injection. |
| python/google-adk/sample-agent/.gcloudignore | Adds allowlist-based source upload rules for Cloud Run source deploys. |
| python/google-adk/sample-agent/.python-version | Pins the Python runtime version used by buildpacks/pyenv tooling. |
| python/google-adk/sample-agent/_freeze.py | Adds a helper script for generating requirements.txt from a local environment. |
Copilot's findings
- Files reviewed: 10/10 changed files
- Comments generated: 4
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
…e header to _freeze.py - token_cache.py: guard cache reads/writes with a process-wide threading.Lock (request path vs BatchSpanProcessor export thread); store (token, expiry) with expiry parsed from JWT exp claim and evict expired entries on read. - _freeze.py: add Microsoft copyright + MIT license header.
Local pip-freeze helper not needed by sample consumers; requirements.txt is the committed contract.
Span remap + token caching + Cloud Run deploy scaffolding for routing Google ADK agent telemetry through the Agent 365 observability pipeline.