fetchFieldLatencies

suspend fun fetchFieldLatencies(serverUrl: String = INTERNAL_PLATFORM_API_URL, apiKey: String, serviceId: String, fromSeconds: Long = 864000, percentile: Double = 0.95): FieldInsights.FieldLatenciesResult

Fetches the field latencies for a given service.

Parameters

serverUrl

the URL of the Apollo Platform API. Used for testing only, defaults to the production URL.

apiKey

the API key to use.

serviceId

the service ID (aka Graph ID) to get the data from.

fromSeconds

starting point of the data, as a number of seconds in the past from now. Defaults to 864000 (10 days).

percentile

the percentile to use for the histogram, from 0 to 1. Defaults to 0.95.