metrics

package
v2.0.0-...-a7294fb Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetricsPolicy

func NewMetricsPolicy(metrics *ARMClientMetrics) policy.Policy

func RegisterMetrics

func RegisterMetrics(metrics ...Metrics)

Types

type ARMClientMetrics

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

func NewARMClientMetrics

func NewARMClientMetrics() *ARMClientMetrics

func (*ARMClientMetrics) RecordAzureFailedRequestsTotal

func (a *ARMClientMetrics) RecordAzureFailedRequestsTotal(resourceName string, method string)

RecordAzureFailedRequestsTotal records the number of failed requests to ARM.

func (*ARMClientMetrics) RecordAzureRequestsTime

func (a *ARMClientMetrics) RecordAzureRequestsTime(resourceName string, requestTime time.Duration, method string)

RecordAzureRequestsTime records the round-trip time taken by the request to ARM.

func (*ARMClientMetrics) RecordAzureSuccessRequestsTotal

func (a *ARMClientMetrics) RecordAzureSuccessRequestsTotal(resourceName string, statusCode int, method string)

RecordAzureSuccessRequestsTotal records the total successful number requests to ARM by increasing the counter.

func (*ARMClientMetrics) RegisterMetrics

func (a *ARMClientMetrics) RegisterMetrics()

RegisterMetrics registers the collectors with prometheus server.

type CEL

type CEL interface {
	Metrics

	RecordEnvCacheHit(resourceName string)
	RecordEnvCacheMiss(resourceName string)
	RecordProgramCacheHits(resourceName string)
	RecordProgramCacheMisses(resourceName string)
	RecordCompilationTime(resourceName string, requestTime time.Duration)
}

func NewCEL

func NewCEL() CEL

func NewCELNoOp

func NewCELNoOp() CEL

type Metrics

type Metrics interface {
	RegisterMetrics()
}

type MetricsPolicy

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

MetricsPolicy is an Azure SDK Track 2 policy for logging metrics about HTTP status

func (*MetricsPolicy) Do

func (m *MetricsPolicy) Do(req *policy.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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