Documentation ¶
Index ¶
- type GCP
- func (p *GCP) CanHandleSelector(labels entities.Selector) bool
- func (p *GCP) Close() error
- func (p *GCP) ComputeObjective(o *entities.Objective, from time.Time, to time.Time) (*entities.Indicator, error)
- func (p *GCP) Get99PercentLatencyMetricForResource(resourceID string, from, to time.Time) (float64, error)
- func (p *GCP) GetAvailabilityPercentage(resourceID string, from, to time.Time) (float64, error)
- func (p *GCP) GetCloudfunctionExecutionTimePercent(s entities.Selector, from, to time.Time) (float64, error)
- func (p *GCP) GetCloudrunServiceRequestLatencyPercent(s entities.Selector, from, to time.Time) (float64, error)
- func (p *GCP) GetErrorPercentageMetricForResource(resourceID string, from, to time.Time) (float64, error)
- func (p *GCP) GetLatencyAboveThresholdPercentage(resourceID string, from, to time.Time, threshold int) (float64, error)
- func (p *GCP) ResourceFromSelector(s entities.Selector) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCP ¶
type GCP struct {
// contains filtered or unexported fields
}
func NewGCP ¶
NewGCP currently needs a service account configured or gcloud auth within same session to function
func (*GCP) CanHandleSelector ¶ added in v0.21.0
func (*GCP) Close ¶ added in v0.13.1
Close closes the GCP monitoring client connection See: https://pkg.go.dev/cloud.google.com/go@v0.81.0/monitoring/apiv3/v2#MetricClient.Close
func (*GCP) ComputeObjective ¶ added in v0.21.0
func (*GCP) Get99PercentLatencyMetricForResource ¶
func (p *GCP) Get99PercentLatencyMetricForResource(resourceID string, from, to time.Time) (float64, error)
Get99PercentLatencyMetricForResource retrieves latency data for a resource on GCP and returns the mean of the 99th Percentile latencies across regions of the given resource
func (*GCP) GetAvailabilityPercentage ¶ added in v0.11.0
func (*GCP) GetCloudfunctionExecutionTimePercent ¶ added in v0.35.0
func (p *GCP) GetCloudfunctionExecutionTimePercent(s entities.Selector, from, to time.Time) (float64, error)
GetCloudfunctionExecutionTimePercent - calculate percentage of execution times executed within the threshold * assumes monitoring API filters are defined under selector["metric.filter"]
func (*GCP) GetCloudrunServiceRequestLatencyPercent ¶ added in v0.35.0
func (p *GCP) GetCloudrunServiceRequestLatencyPercent(s entities.Selector, from, to time.Time) (float64, error)
GetCloudrunServiceRequestLatency95 - calculate percentage of requests within the given latency threshold * assumes monitoring API filters are defined under selector["metric.filter"]
func (*GCP) GetErrorPercentageMetricForResource ¶
func (p *GCP) GetErrorPercentageMetricForResource(resourceID string, from, to time.Time) (float64, error)
GetErrorPercentageMetricForResource retrieves the error status code data for a resource on GCP and calculates percentage of 500 status code