Documentation ¶
Overview ¶
Groundtruth for available metrics and label names.
Index ¶
- Constants
- Variables
- func GetGaugeVec(name GaugeVecName) *prometheus.GaugeVec
- func GetHistogramVec(name HistogramVecName) *prometheus.HistogramVec
- type AdaptiveTimeoutGaugeLabels
- type CircuitBreakerGaugeLabels
- type GaugeOp
- type GaugeVecName
- type HistogramVecName
- type PrimaryAdapterDurationLabels
- type PrimaryAdapterHandler
- type PrimaryAdapterInProgressLabels
- type PrimaryLabels
- type RetryGaugeLabels
- type SecondaryAdapterCallDurationLabels
- type SecondaryAdapterTaskDurationLabels
- type SecondaryLabels
- type Status
- type TaskHandler
- type TaskSetResult
- type TelemetryContext
- type TimeoutGaugeLabels
Constants ¶
View Source
const ( PrimaryAdapterDuration HistogramVecName = "primary_adapter_duration_ms" SecondaryAdapterCallDuration HistogramVecName = "secondary_adapter_call_duration_ms" SecondaryAdapterTaskDuration HistogramVecName = "secondary_adapter_task_duration_ms" PrimaryAdapterInProgress GaugeVecName = "primary_adapter_in_progress" AdaptiveTaskTimeoutDuration GaugeVecName = "adaptive_task_timeout_duration" AdaptiveCallTimeoutDuration GaugeVecName = "adaptive_call_timeout_duration" CallTimeout GaugeVecName = "call_timeout_ms" TaskTimeout GaugeVecName = "task_timeout_ms" CircuitBreakerDisabled GaugeVecName = "circuit_breaker_disabled" CircuitBreakerCountRetries GaugeVecName = "circuit_breaker_count_retries" CircuitBreakerIntervalSecs GaugeVecName = "circuit_breaker_interval_seconds" CircuitBreakerMaxRequests GaugeVecName = "circuit_breaker_max_requests" CircuitBreakerMinRequests GaugeVecName = "circuit_breaker_min_requests" CircuitBreakerTimeout GaugeVecName = "circuit_breaker_timeout_seconds" CircuitBreakerRatio GaugeVecName = "circuit_breaker_ratio" CircuitBreakerConsecutiveFails GaugeVecName = "circuit_breaker_consecutive_fails" RetryDisabled GaugeVecName = "retry_disabled" RetryMaxAttempt GaugeVecName = "retry_max_attempt" RetryInitialBackoff GaugeVecName = "retry_initial_backoff" )
Variables ¶
View Source
var DurationHistogramBuckets = slices.Concat( []float64{0.1, 0.25, 0.5}, []float64{1, 2.5, 5}, []float64{10, 25, 50}, []float64{100, 250, 500}, []float64{1000, 2500, 5000}, []float64{10000, 25000, 50000, 100000}, )
Default Histogram bucket is []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10} and desinged as response time in seconds Adjust it so that it is in milliseconds
Functions ¶
func GetGaugeVec ¶
func GetGaugeVec(name GaugeVecName) *prometheus.GaugeVec
func GetHistogramVec ¶
func GetHistogramVec(name HistogramVecName) *prometheus.HistogramVec
Types ¶
type AdaptiveTimeoutGaugeLabels ¶ added in v1.0.18
type AdaptiveTimeoutGaugeLabels struct {
Ctx TelemetryContext
}
func (AdaptiveTimeoutGaugeLabels) AsMap ¶ added in v1.0.18
func (atgl AdaptiveTimeoutGaugeLabels) AsMap() map[string]string
type CircuitBreakerGaugeLabels ¶
type CircuitBreakerGaugeLabels struct {
Ctx TelemetryContext
}
func (CircuitBreakerGaugeLabels) AsMap ¶
func (cbgl CircuitBreakerGaugeLabels) AsMap() map[string]string
type GaugeVecName ¶
type GaugeVecName = string
type HistogramVecName ¶
type HistogramVecName = string
type PrimaryAdapterDurationLabels ¶
type PrimaryAdapterDurationLabels struct { PrimaryLabels Status Status }
func (PrimaryAdapterDurationLabels) AsMap ¶
func (padl PrimaryAdapterDurationLabels) AsMap() map[string]string
type PrimaryAdapterHandler ¶
type PrimaryAdapterHandler struct { ServiceName string ServerConfig *model.ServerConfig ConsumerConfig *model.ConsumerConfig TaskSet []TaskHandler }
either StatelessAdapterConfig or BrokerAdapterConfig must be defined
func (PrimaryAdapterHandler) GetId ¶
func (iah PrimaryAdapterHandler) GetId() string
type PrimaryAdapterInProgressLabels ¶ added in v1.0.15
type PrimaryAdapterInProgressLabels struct {
PrimaryLabels
}
func (PrimaryAdapterInProgressLabels) AsMap ¶ added in v1.0.15
func (p PrimaryAdapterInProgressLabels) AsMap() map[string]string
type PrimaryLabels ¶
type PrimaryLabels struct { ServiceName string Variant string Action string Route string Topic string Id string }
func (PrimaryLabels) GetPrimaryLabels ¶
func (pl PrimaryLabels) GetPrimaryLabels() map[string]string
type RetryGaugeLabels ¶
type RetryGaugeLabels struct { Ctx TelemetryContext BackoffPolicy string }
func (RetryGaugeLabels) AsMap ¶
func (rgl RetryGaugeLabels) AsMap() map[string]string
type SecondaryAdapterCallDurationLabels ¶
type SecondaryAdapterCallDurationLabels struct { Ctx TelemetryContext Status Status NthAttmpt uint32 CircuitBreakerState string IsConcurrent bool }
func (SecondaryAdapterCallDurationLabels) AsMap ¶
func (sacdl SecondaryAdapterCallDurationLabels) AsMap() map[string]string
type SecondaryAdapterTaskDurationLabels ¶
type SecondaryAdapterTaskDurationLabels struct { Ctx TelemetryContext Status Status TotalAttempts uint32 CircuitBreakerState string IsConcurrent bool }
func (SecondaryAdapterTaskDurationLabels) AsMap ¶
func (satdl SecondaryAdapterTaskDurationLabels) AsMap() map[string]string
type SecondaryLabels ¶
type SecondaryLabels struct { DstServiceName string DstVariant string DstAction string DstRoute string DstTopic string DstId string }
func (SecondaryLabels) GetSecondaryLabels ¶
func (sl SecondaryLabels) GetSecondaryLabels() map[string]string
type TaskHandler ¶
type TaskHandler func(context.Context, chan<- *secondary.SecondaryPortCallResult)
type TaskSetResult ¶
type TaskSetResult struct { ShouldFail bool TaskResults []*secondary.SecondaryPortCallResult }
TaskSetResult is returned for collection of task results It may or may not fail the request based on error handling configuration.
type TelemetryContext ¶
type TelemetryContext struct { PrimaryLabels SecondaryLabels }
func NewTelemetryContext ¶
func NewTelemetryContext(serviceName string, primaryConfig *model.PrimaryAdapterSpec, secondaryConfig *model.SecondaryAdapterConfig) TelemetryContext
func (TelemetryContext) AsMap ¶
func (tx TelemetryContext) AsMap() map[string]string
type TimeoutGaugeLabels ¶
type TimeoutGaugeLabels struct {
Ctx TelemetryContext
}
func (TimeoutGaugeLabels) AsMap ¶
func (tgl TimeoutGaugeLabels) AsMap() map[string]string
Click to show internal directories.
Click to hide internal directories.