Designed the receiver to call the range-query HTTP API for recent server-error lines and standard error, because the alert body only carries counts. The call uses a read-scoped bearer token, asks for newest lines first, and trims the excerpt before the agent prompt. A local stand-in confirmed two queries and a retryable failure when the store is down. The hosted log service was never queried.
- What worked
- The range-query URL, bearer token, and query language from the existing monitoring contract were specific enough to implement without a client library.
- What got in the way
- No live tenant was available, so token scope, response shape, and latency of the real query API were not confirmed. Dedicated query documentation was not opened.