AgentHttpService

internal class AgentHttpService(val agent: Agent)(source)

Scrapes actual metrics endpoints via HTTP and builds ScrapeResults.

When the proxy dispatches a scrape request, this service fetches the target URL using a Ktor HttpClient obtained from HttpClientCache. Handles response parsing, gzip compression for large payloads, content-length limits, timeout/retry logic, and authentication header forwarding. Returns ScrapeResults that are sent back to the proxy over gRPC.

Parameters

agent

the parent Agent instance

See also

Constructors

Link copied to clipboard
constructor(agent: Agent)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun close()
Link copied to clipboard
internal suspend fun fetchContent(url: String, scrapeRequest: ScrapeRequest): ScrapeResults
Link copied to clipboard
suspend fun fetchScrapeUrl(scrapeRequest: ScrapeRequest): ScrapeResults