stats

package
v5.0.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RemainingTokens measures the remaining number of API tokens.
	RemainingTokens = stats.Int64("RemainingTokens",
		"Measures the remaining count of API tokens", stats.UnitDimensionless)
	// RetryAfter measures the retry delay when dealing with secondary rate limits.
	RetryAfter = stats.Int64("RetryAfter",
		"Measures the retry delay when dealing with secondary rate limits", stats.UnitSeconds)
	// TokenIndex is the tag key for specifying a unique token.
	TokenIndex = tag.MustNewKey("tokenIndex")
	// ResourceType specifies the type of GitHub resource.
	ResourceType = tag.MustNewKey("resourceType")

	// GithubTokens tracks the usage/remaining stats per token per resource-type.
	GithubTokens = view.View{
		Name:        "GithubTokens",
		Description: "Token usage/remaining stats for Github API tokens",
		Measure:     RemainingTokens,
		TagKeys:     []tag.Key{TokenIndex, ResourceType},
		Aggregation: view.LastValue(),
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL