AI-472 Add replay-safe Google ADK metrics sample - #355
Conversation
DABH
left a comment
There was a problem hiding this comment.
Reviewed at 0b92811. The core thesis holds and I verified it rather than taking the README's word for it — I probed _skip_recording directly and got 6 recordings live, 6 suppressed under Replayer, counts_after == counts_before — and the happy path works end to end against a real dev server. Switching this commit to Replayer and relative equality was the right response to the macOS failures; it's one indentation away from green.
One item that isn't tied to a line in this diff: metrics is missing from the suite scenario table. google_adk_agents/README.md:39-46 lists all six siblings and nothing in the repo links to google_adk_agents/metrics/README.md, so the sample is unreachable from any index.
| [metrics](./metrics/README.md) | Google ADK's OpenTelemetry metrics exported to a local Prometheus endpoint, with `ReplaySafeMeterProvider` keeping replay from double-counting observations. |That row is only accurate once the nested pyproject.toml goes away — the suite's generic run block at :48-53 doesn't work for this scenario today. See the pyproject.toml:8 comment.
e2e0254 to
799da5c
Compare
This PR adds a Google ADK sample that exports ADK OpenTelemetry metrics through
ReplaySafeMeterProvider. A deterministic local model keeps the sample API-key-free, and the Workflow includes a post-metrics replay boundary so duplicate observations are detectable.Note: The sample pins the SDK revision that introduces
ReplaySafeMeterProvideruntil that API is available in a release.