Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResponseAndTiming ¶
GetResponseAndTiming gets the response and response time for an http request to the endpoint at a given urlString and records the metrics into the appropriate prometheus register under the label specified by urlString The args are expected to be a map of the string "promArgs" to the above PrometheusArgs struct. It is formatted this way in order for it to be able to be called by a worker (see endpointmanager/pkg/workers)
Types ¶
type PrometheusArgs ¶
type PrometheusArgs struct { URLString string ResponseTimeGaugeVec *prometheus.GaugeVec TotalUptimeChecksCounterVec *prometheus.CounterVec TotalFailedUptimeChecksCounterVec *prometheus.CounterVec HTTPCodesGaugeVec *prometheus.GaugeVec }
PrometheusArgs is a struct of the prometheus collectors that are used to save the values like response time and response code from the URL request and the URLString used to make the request and access the collectors
Click to show internal directories.
Click to hide internal directories.