metrics

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Count = &view.View{
		Name:        "maps.googleapis.com/client/count",
		Description: "Request Counts",
		TagKeys:     []tag.Key{requestName, apiStatus, httpCode, metroArea},
		Measure:     latency_measure,
		Aggregation: view.Count(),
	}

	Latency = &view.View{
		Name:        "maps.googleapis.com/client/request_latency",
		Description: "Total time between library method called and results returned",
		TagKeys:     []tag.Key{requestName, apiStatus, httpCode, metroArea},
		Measure:     latency_measure,
		Aggregation: view.Distribution(20.0, 25.2, 31.7, 40.0, 50.4, 63.5, 80.0, 100.8, 127.0, 160.0, 201.6, 254.0, 320.0, 403.2, 508.0, 640.0, 806.3, 1015.9, 1280.0, 1612.7, 2031.9, 2560.0, 3225.4, 4063.7),
	}
)

Functions

func RegisterViews

func RegisterViews() error

Types

type NoOpReporter

type NoOpReporter struct {
}

func (NoOpReporter) NewRequest

func (n NoOpReporter) NewRequest(name string) Request

type OpenCensusReporter

type OpenCensusReporter struct {
}

func (OpenCensusReporter) NewRequest

func (o OpenCensusReporter) NewRequest(name string) Request

type Reporter

type Reporter interface {
	NewRequest(name string) Request
}

type Request

type Request interface {
	OnBeforeResponseDecode(httpResp *http.Response)
	EndRequest(ctx context.Context, err error, httpResp *http.Response, metro string)
}

Jump to

Keyboard shortcuts

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