metrics

package
v1.0.28 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PromRegistry *prometheus.Registry
)

Functions

func ObservePrimaryAdapterDuration

func ObservePrimaryAdapterDuration(duration time.Duration, labels domain.PrimaryAdapterDurationLabels)

func ObserveSecondaryAdapterCallDuration

func ObserveSecondaryAdapterCallDuration(duration time.Duration, labels domain.SecondaryAdapterCallDurationLabels)

func ObserveSecondaryAdapterTaskDuration

func ObserveSecondaryAdapterTaskDuration(duration time.Duration, labels domain.SecondaryAdapterTaskDurationLabels)

func ServeMetrics

func ServeMetrics(ctx context.Context, wg *sync.WaitGroup)

func SetAdaptiveCallTimeoutDuration added in v1.0.18

func SetAdaptiveCallTimeoutDuration(value time.Duration, labels domain.AdaptiveTimeoutGaugeLabels)

func SetAdaptiveTaskTimeoutDuration added in v1.0.18

func SetAdaptiveTaskTimeoutDuration(value time.Duration, labels domain.AdaptiveTimeoutGaugeLabels)

func SetGaugeMetricsFromSpecs

func SetGaugeMetricsFromSpecs(spec model.ResiliencySpec, telemetryCtx domain.TelemetryContext)

SetGaugeMetricsFromSpecs sets gauge metrics from resiliency spec. `With` can panic, however, it shouldn't if the labels match what's defined in Metrics instance.

func SetPrimaryAdapterInProgress added in v1.0.15

func SetPrimaryAdapterInProgress(op domain.GaugeOp, labels domain.PrimaryAdapterInProgressLabels)

Types

type Metrics

type Metrics struct {
	PrimaryAdapterDuration         *prometheus.HistogramVec
	SecondaryAdapterCallDuration   *prometheus.HistogramVec
	SecondaryAdapterTaskDuration   *prometheus.HistogramVec
	PrimaryAdapterInProgress       *prometheus.GaugeVec
	AdaptiveTaskTimeoutDuration    *prometheus.GaugeVec
	AdaptiveCallTimeoutDuration    *prometheus.GaugeVec
	CallTimeout                    *prometheus.GaugeVec
	TaskTimeout                    *prometheus.GaugeVec
	CircuitBreakerDisabled         *prometheus.GaugeVec
	CircuitBreakerCountRetries     *prometheus.GaugeVec
	CircuitBreakerIntervalSecs     *prometheus.GaugeVec
	CircuitBreakerMaxRequests      *prometheus.GaugeVec
	CircuitBreakerMinRequests      *prometheus.GaugeVec
	CircuitBreakerTimeout          *prometheus.GaugeVec
	CircuitBreakerRatio            *prometheus.GaugeVec
	CircuitBreakerConsecutiveFails *prometheus.GaugeVec
	RetryDisabled                  *prometheus.GaugeVec
	RetryMaxAttempt                *prometheus.GaugeVec
	RetryInitialBackoff            *prometheus.GaugeVec
}

func GetInstance

func GetInstance() *Metrics

Jump to

Keyboard shortcuts

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