stats

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package stats defines opencensus monitoring stats exposed by Scorecard.

Index

Constants

This section is empty.

Variables

View Source
var (
	// CheckRuntimeInSec measures the CPU runtime in seconds per check.
	CheckRuntimeInSec = stats.Int64("CheckRuntimeInSec", "Measures the CPU runtime in seconds for a check",
		stats.UnitSeconds)
	// CheckErrors measures the count of errors per check.
	CheckErrors = stats.Int64("CheckErrors", "Measures the count of errors", stats.UnitDimensionless)
	// HTTPRequests measures the count of HTTP requests.
	HTTPRequests = stats.Int64("HTTPRequests", "Measures the count of HTTP requests", stats.UnitDimensionless)
)
View Source
var (
	// CheckName is the tag key for the check name.
	CheckName = tag.MustNewKey("checkName")
	// ErrorName is the tag key for errors.
	ErrorName = tag.MustNewKey("errorName")
	// RequestTag is the tag key for the request type.
	RequestTag = tag.MustNewKey("requestTag")
)
View Source
var (
	// CheckRuntime tracks CPU runtime stats for checks.
	CheckRuntime = view.View{
		Name:        "CheckRuntime",
		Description: "CPU runtime stats per check",
		Measure:     CheckRuntimeInSec,
		TagKeys:     []tag.Key{CheckName},

		Aggregation: view.Distribution(
			0,
			1<<2,
			1<<3,
			1<<4,
			1<<5,
			1<<6,
			1<<7,
			1<<8,
			1<<9,
			1<<10,
			1<<11,
			1<<12,
			1<<13,
			1<<14,
			1<<15),
	}

	// CheckErrorCount tracks error count stats for checks.
	CheckErrorCount = view.View{
		Name:        "CheckErrorCount",
		Description: "Error count by type per check",
		Measure:     CheckErrors,
		TagKeys:     []tag.Key{CheckName, ErrorName},
		Aggregation: view.Count(),
	}

	// OutgoingHTTPRequests tracks HTTPRequests made.
	OutgoingHTTPRequests = view.View{
		Name:        "OutgoingHTTPRequests",
		Description: "HTTPRequests made per check",
		Measure:     HTTPRequests,
		TagKeys:     []tag.Key{CheckName, RequestTag},
		Aggregation: view.Count(),
	}
)

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