Documentation
¶
Overview ¶
+kubebuilder:validation:Optional
Index ¶
Constants ¶
const (
// HTTPRequestMetricName - metric from http server.
HTTPRequestMetricName = "http_requests_total"
// HTTPRequestLatencyMetricName - metric from http server.
HTTPRequestLatencyMetricName = "http_requests_latency_ms"
// HTTPErrorMetricName - metric from http server.
HTTPErrorMetricName = "http_errors_total"
// SignalReadingMetricName - used in circuit metrics.
SignalReadingMetricName = "signal_reading"
// FluxMeterMetricName name of fluxmeter metrics.
FluxMeterMetricName = "flux_meter"
// RateLimiterCounterMetricName - name of the counter describing times rate limiter was triggered.
RateLimiterCounterMetricName = "rate_limiter_counter"
// ClassifierCounterMetricName - name of the counter describing times classifier was triggered.
ClassifierCounterMetricName = "classifier_counter"
// DistCacheEntriesTotalMetricName - metric for the total number of entries (including replicas) stored during the life of this instance.
DistCacheEntriesTotalMetricName = "distcache_entries_total"
// DistCacheDeleteHitsMetricName - metric for number of deletion requests resulting in an item being removed.
DistCacheDeleteHitsMetricName = "distcache_delete_hits"
// DistCacheDeleteMissesMetricName - metric for number of deletion requests for missing keys.
DistCacheDeleteMissesMetricName = "distcache_delete_misses"
// DistCacheGetMissesMetricName - metric for number of entries that have been requested and not found.
DistCacheGetMissesMetricName = "distcache_get_misses"
// DistCacheGetHitsMetricName - metric for number of entries that have been requested and found present.
DistCacheGetHitsMetricName = "distcache_get_hits"
// DistCacheEvictedTotalMetricName - metric for number of entries removed from cache to free memory for new entries.
DistCacheEvictedTotalMetricName = "distcache_evicted_total"
// WorkloadLatencyMetricName - metric used for grouping latencies per workload.
WorkloadLatencyMetricName = "workload_latency_ms"
// WorkloadLatencySumMetricName - metric from workload histogram.
WorkloadLatencySumMetricName = "workload_latency_ms_sum"
// WorkloadLatencyCountMetricName - metric from workload histogram.
WorkloadLatencyCountMetricName = "workload_latency_ms_count"
// WorkloadCounterMetricName - metric used for counting workload requests.
WorkloadCounterMetricName = "workload_requests_total"
// AcceptedConcurrencyMetricName - metric for measuring latencies of accepted requests.
AcceptedConcurrencyMetricName = "accepted_concurrency_ms"
// IncomingConcurrencyMetricName - metric for measuring latencies of all incoming requests.
IncomingConcurrencyMetricName = "incoming_concurrency_ms"
// WFQFlowsMetricName - weighted fair queuing number of flows gauge.
WFQFlowsMetricName = "wfq_flows_total"
// WFQRequestsMetricName - weighted fair queuing number of requests gauge.
WFQRequestsMetricName = "wfq_requests_total"
// TokenBucketLMMetricName - a gauge that tracks the load multiplier.
TokenBucketLMMetricName = "token_bucket_lm_ratio"
// TokenBucketFillRateMetricName - a gauge that tracks the fill rate of token bucket.
TokenBucketFillRateMetricName = "token_bucket_fill_rate"
// TokenBucketCapacityMetricName - a gauge that tracks the capacity of token bucket.
TokenBucketCapacityMetricName = "token_bucket_capacity_total"
// TokenBucketAvailableMetricName - a gauge that tracks the number of tokens available in token bucket.
TokenBucketAvailableMetricName = "token_bucket_available_tokens_total"
// FlowControlRequestsMetricName - counter for Check requests for flowcontrol.
FlowControlRequestsMetricName = "flowcontrol_requests_total"
// FlowControlDecisionsMetricName - counter for Check requests per decision type.
FlowControlDecisionsMetricName = "flowcontrol_decisions_total"
// FlowControlErrorReasonsMetricName - metric for error reason on FCS Check requests.
FlowControlErrorReasonsMetricName = "flowcontrol_error_reasons_total"
// FlowControlRejectReasonsMetricName - metric for reject reason on FCS Check requests.
FlowControlRejectReasonsMetricName = "flowcontrol_reject_reasons_total"
// InstanceLabel used to identify the host name on which an Aperture process is running.
InstanceLabel = "instance"
// ProcessUUIDLabel used to uniquely identify an Aperture process.
ProcessUUIDLabel = "process_uuid"
// DistCacheMemberIDLabel - label specifying unique identifier of the node in the olric cluster.
DistCacheMemberIDLabel = "distcache_member_id"
// DistCacheMemberNameLabel - label specifying name of the node in the olric cluster.
DistCacheMemberNameLabel = "distcache_member_name"
// PolicyNameLabel - label used in prometheus.
PolicyNameLabel = "policy_name"
// PolicyHashLabel - label used in prometheus.
PolicyHashLabel = "policy_hash"
// ComponentIndexLabel - index of component in circuit label.
ComponentIndexLabel = "component_index"
// DecisionTypeLabel - label for decision type dropped or accepted.
DecisionTypeLabel = "decision_type"
// WorkloadIndexLabel - label for choosing correct workload.
WorkloadIndexLabel = "workload_index"
// SignalNameLabel - label for saving circuit signal metrics.
SignalNameLabel = "signal_name"
// FluxMeterNameLabel - specifying flux meter's name.
FluxMeterNameLabel = "flux_meter_name"
// AttributeFoundLabel - label for specifying if attribute was found.
AttributeFoundLabel = "attribute_found"
// AttributeFoundTrue - if attribute was found.
AttributeFoundTrue = "true"
// AttributeFoundFalse - if attribute was not found.
AttributeFoundFalse = "false"
// ClassifierIndexLabel - prometheus label specifying clasiffier index.
ClassifierIndexLabel = "classifier_index"
// StatusCodeLabel - http status code.
StatusCodeLabel = "http_status_code"
// MethodLabel - label from http method.
MethodLabel = "http_method"
// HandlerName - name of the http handler. Defaults to 'default'.
HandlerName = "handler_name"
// FeatureStatusLabel - feature status.
FeatureStatusLabel = "feature_status"
// FeatureStatusOK - feature status OK.
FeatureStatusOK = "OK"
// FeatureStatusError - feature status Error.
FeatureStatusError = "Error"
// ResponseStatusLabel - response status. A common label to denote OK or Error across all protocols.
ResponseStatusLabel = "response_status"
// ResponseStatusOK - response status OK.
ResponseStatusOK = FeatureStatusOK
// ResponseStatusError - response status Error.
ResponseStatusError = FeatureStatusError
// FlowControlCheckDecisionTypeLabel - label for decision type dropped or accepted.
FlowControlCheckDecisionTypeLabel = "decision_type"
// FlowControlCheckErrorReasonLabel - label for error reason on FCS Check request.
FlowControlCheckErrorReasonLabel = "error_reason"
// FlowControlCheckRejectReasonLabel - label for reject reason on FCS Check request.
FlowControlCheckRejectReasonLabel = "reject_reason"
// DefaultWorkloadIndex - when workload is not specified this value is used.
DefaultWorkloadIndex = "default"
// DefaultAgentGroup - default agent group.
DefaultAgentGroup = "default"
)
Variables ¶
This section is empty.
Functions ¶
func Module ¶
func Module() fx.Option
Module is a fx module that provides Prometheus registry and invokes registering metrics handler.
func ProvidePrometheusRegistry ¶
func ProvidePrometheusRegistry(unmarshaller config.Unmarshaller) (*prometheus.Registry, error)
ProvidePrometheusRegistry creates a new Prometheus Registry and provides it via Fx. Metrics from the Registry are served on /metrics via the default http server of Fx application.
func RegisterMetricsHandler ¶
func RegisterMetricsHandler(router *mux.Router, pr *prometheus.Registry)
RegisterMetricsHandler registers the metrics handler on the promhttp server.
Types ¶
type MetricsConfig ¶
type MetricsConfig struct {
// Pedantic controls whether a pedantic Registerer is used as the prometheus backend. See <https://godoc.org/github.com/prometheus/client_golang/prometheus#NewPedanticRegistry>
Pedantic bool `json:"pedantic" default:"false"`
// EnableGoCollector controls whether the go collector is registered on startup. See <https://godoc.org/github.com/prometheus/client_golang/prometheus#NewGoCollector>
EnableGoCollector bool `json:"enable_go_metrics" default:"false"`
// EnableProcessCollector controls whether the process collector is registered on startup. See <https://godoc.org/github.com/prometheus/client_golang/prometheus#NewProcessCollector>
EnableProcessCollector bool `json:"enable_process_collector" default:"false"`
}
MetricsConfig holds configuration for service metrics. swagger:model +kubebuilder:object:generate=true
func (*MetricsConfig) DeepCopy ¶ added in v0.1.2
func (in *MetricsConfig) DeepCopy() *MetricsConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsConfig.
func (*MetricsConfig) DeepCopyInto ¶ added in v0.1.2
func (in *MetricsConfig) DeepCopyInto(out *MetricsConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.