sheets

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

Overview

Package sheets provides a metrics provider implementation that retrieves metrics from a publicly-available Google Sheets

The document must have the following values, starting at row 2, in the following order.

Region, Service, Request Count, Error Rate, Latency P99, Latency P95, Latency P50

Example us-east1, tester, 1000, 0.01, 1000, 750, 500

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 Google Sheets.

func NewProvider

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

NewProvider initializes a connection to Google Sheets

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 matching the filter.

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.

func (*Provider) RequestCount

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

RequestCount 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.

For Google Sheets, ignore this since the data in the document is always for the candidate revision.

Jump to

Keyboard shortcuts

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