Documentation ¶
Index ¶
- Variables
- func ObservePrimaryAdapterDuration(duration time.Duration, labels domain.PrimaryAdapterDurationLabels)
- func ObserveSecondaryAdapterCallDuration(duration time.Duration, labels domain.SecondaryAdapterCallDurationLabels)
- func ObserveSecondaryAdapterTaskDuration(duration time.Duration, labels domain.SecondaryAdapterTaskDurationLabels)
- func ServeMetrics(ctx context.Context, wg *sync.WaitGroup)
- func SetAdaptiveCallTimeoutDuration(value time.Duration, labels domain.AdaptiveTimeoutGaugeLabels)
- func SetAdaptiveTaskTimeoutDuration(value time.Duration, labels domain.AdaptiveTimeoutGaugeLabels)
- func SetGaugeMetricsFromSpecs(spec model.ResiliencySpec, telemetryCtx domain.TelemetryContext)
- func SetPrimaryAdapterInProgress(op domain.GaugeOp, labels domain.PrimaryAdapterInProgressLabels)
- type Metrics
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 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
Click to show internal directories.
Click to hide internal directories.