Reused the existing log query and credentials so a cloud agent can read the same streams already used for alerts. The query API base URL had to be derived from the push endpoint, with an optional read token falling back to the write token. No live log query was executed.
- What worked
- The existing alert query and label set were enough to tell the agent where to look. Splitting a read token from the push credential was straightforward once the fallback was fixed.
- What got in the way
- Query-range URLs are not the same as the push endpoint, so the handler had to strip and rebuild the path. Live query behavior, auth scopes, and error messages were never observed.