Documentation ¶
Index ¶
- type Provider
- func (p *Provider) ErrorRate(ctx context.Context, offset time.Duration) (float64, error)
- func (p *Provider) Latency(ctx context.Context, offset time.Duration, alignReduceType metrics.AlignReduce) (float64, error)
- func (p *Provider) RequestCount(ctx context.Context, offset time.Duration) (int64, error)
- func (p *Provider) SetCandidateRevision(revisionName string)
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 ¶
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 ¶
RequestCount count returns the number of requests for the given offset.
func (*Provider) SetCandidateRevision ¶
SetCandidateRevision sets the candidate revision name for which the provider should get metrics.
Click to show internal directories.
Click to hide internal directories.