Documentation ¶
Index ¶
- func CollectCacheEntryAgeMetrics(age float64, path, userAgent, tokenHash string)
- func CollectCacheRequestMetrics(mode, path, userAgent, tokenHash string)
- func CollectGitHubRequestMetrics(tokenHash, path, statusCode, userAgent string, roundTripTime float64)
- func CollectGitHubRequestWaitDurationMetrics(tokenHash, requestType, api string, duration time.Duration)
- func CollectGitHubTokenMetrics(tokenHash, apiVersion string, headers http.Header, ...)
- func CollectRequestTimeoutMetrics(tokenHash, path, userAgent string, reqStartTime, responseTime time.Time)
- type Hasher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectCacheRequestMetrics ¶
func CollectCacheRequestMetrics(mode, path, userAgent, tokenHash string)
CollectCacheRequestMetrics records a cache outcome for a specific path
func CollectGitHubRequestMetrics ¶
func CollectGitHubRequestMetrics(tokenHash, path, statusCode, userAgent string, roundTripTime float64)
CollectGitHubRequestMetrics publishes the number of requests by API path to `github_requests` on prometheus.
func CollectGitHubRequestWaitDurationMetrics ¶
func CollectGitHubRequestWaitDurationMetrics(tokenHash, requestType, api string, duration time.Duration)
CollectGitHubRequestWaitDurationMetrics publishes the wait duration of requests before sending to respective GitHub API on prometheus.
func CollectGitHubTokenMetrics ¶
func CollectGitHubTokenMetrics(tokenHash, apiVersion string, headers http.Header, reqStartTime, responseTime time.Time)
CollectGitHubTokenMetrics publishes the rate limits of the github api to `github_token_usage` as well as `github_token_reset` on prometheus.
func CollectRequestTimeoutMetrics ¶
func CollectRequestTimeoutMetrics(tokenHash, path, userAgent string, reqStartTime, responseTime time.Time)
CollectRequestTimeoutMetrics publishes the duration of timed-out requests by API path to 'github_request_timeouts' on prometheus.
Types ¶
Click to show internal directories.
Click to hide internal directories.