stackdriver

package
v0.0.0-...-a524873 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is a metrics provider for Cloud Monitoring.

func NewProvider

func NewProvider(ctx context.Context, project string, region string, serviceName string) (*Provider, error)

NewProvider initializes the provider for Cloud Monitoring.

func (*Provider) ErrorRate

func (p *Provider) ErrorRate(ctx context.Context, offset time.Duration) (float64, error)

ErrorRate returns the rate of 5xx errors for the resource in the given offset. It returns 0 if no request was made during the interval.

func (*Provider) Latency

func (p *Provider) Latency(ctx context.Context, offset time.Duration, alignReduceType metrics.AlignReduce) (float64, error)

Latency returns the latency for the resource for the given offset. It returns 0 if no request was made during the interval.

func (*Provider) RequestCount

func (p *Provider) RequestCount(ctx context.Context, offset time.Duration) (int64, error)

RequestCount count returns the number of requests for the given offset.

func (*Provider) SetCandidateRevision

func (p *Provider) SetCandidateRevision(revisionName string)

SetCandidateRevision sets the candidate revision name for which the provider should get metrics.

Jump to

Keyboard shortcuts

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