metrics

package
v0.0.0-...-e835586 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 36 Imported by: 335

README

Common metrics export interfaces for Knative

See the Plan for details on where this is heading.

Current status

The code currently uses OpenCensus to support exporting metrics to multiple backends. Currently, two backends are supported: Prometheus and OpenCensus/OTel.

Metrics export is controlled by a ConfigMap called config-observability which is a key-value map with specific values supported for each of the OpenCensus and Prometheus backends. Hot-reload of the ConfigMap on a running process is supported by directly watching (via the Kubernetes API) the config-observability object. Configuration via environment is also supported for use by the queue-proxy, which runs with user permissions in the user's namespace.

Problems

There are currently 6 supported Golang exporters for OpenCensus. We do not want to build all of those backends into the core of knative.dev/pkg and all downstream dependents, and we'd like all the code shipped in knative.dev/pkg to be able to be tested without needing any special environment setup.

With the current direct-integration setup, there needs to be initial and ongoing work in pkg (which should be high-value, low-churn code) to maintain and update stats exporters which need to be statically linked into ~all Knative binaries. This setup also causes problems for vendors who may want or need to perform an out-of-tree integration (e.g. proprietary or partially-proprietary monitoring stacks).

Another problem is that each vendor's exporter requires different parameters, supplied as Golang Options methods which may require complex connections with the Knative ConfigMap. Two examples of this are secrets like API keys and the Prometheus monitoring port (which requires additional service/etc wiring).

See also this doc, where the plan was worked out.

The plan

OpenCensus (and eventually OpenTelemetry) offers an sidecar or host-level agent with speaks the OpenCensus protocol and can proxy from this protocol to multiple backends.

OpenCensus Agent configuration (From OpenCensus Documentation)

We will standardize on export to the OpenCensus export protocol, and encourage vendors to implement their own OpenCensus Agent or Collector DaemonSet, Sidecar, or other OpenCensus Protocol service which connects to their desired monitoring environment. For now, we will use the config-observability ConfigMap to provide the OpenCensus endpoint, but we will work with the OpenTelemetry group to define a kubernetes-friendly standard export path.

Additionally, once OpenTelemetry agent is stable, we will propose adding the OpenTelemetry agent running on a localhost port as part of the runtime contract.

We need to make sure that the OpenCensus library does not block, fail, or queue metrics in-process excessively in the case where the OpenCensus Agent is not present on the cluster. This will allow us to ship Knative components which attempt to reach out the Agent if present, and which simply retain local statistics for a short period of time if not.

Concerns
  • Unsure about the stability of the OpenCensus Agent (or successor). We're currently investigating this, but the OpenCensus agent seems to have been recommended by several others.
  • Running fluentd as a sidecar was very big (400MB) and had a large impact on cold start times.
    • Mitigation: run the OpenCensus agent as a DaemonSet (like we do with fluentd now).
  • Running as a DaemonSet may make it more difficult to ensure that metrics for each namespace end up in the right place.
    • We have this problem with the built-in configurations today, so this doesn't make the problem substantially worse.
    • May want/need some connection between the Agent and the Kubelet to verify sender identities eventually.
    • Only expose OpenCensus Agent on localhost, not outside the node.
Steps to reach the goal
  • Add OpenCensus Agent as one of the export options.
  • Ensure that all tests pass in a non-Google-Cloud connected environment. This is true today. Ensure this on an ongoing basis.
  • Google to implement OpenCensus Agent configuration to match what they are doing for Stackdriver now. (No public issue link because this should be in Google's vendor-specific configuration.)
  • Document how to configure OpenCensus/OpenTelemetry Agent + Prometheus to achieve the current level of application visibility, and determine a long-term course for how to maintain this as a "bare minimum" supported configuration. https://github.com/knative/docs/pull/3005
  • Stop adding exporter features outside of the OpenCensus / OpenTelemetry export as of 0.13 release (03 March 2020). Between now and 0.13, small amounts of additional features can be built in to assist with the bridging process or to support existing products. New products should build on the OpenCensus Agent approach.
  • Removal of the Stackdriver OpenCensus Exporter https://github.com/knative/pkg/issues/2173
  • Revisit Adopting OpenTelemetry SDKs instead of OpenCensus

Documentation

Overview

Package metrics provides Knative utilities for exporting metrics to OpenCensus/OTel or Prometheus backend based on config-observability settings.

Index

Constants

View Source
const (
	// BackendDestinationKey points to the config map entry key for metrics backend destination.
	BackendDestinationKey = "metrics.backend-destination"
	// DomainEnv points to the metrics domain env var.
	DomainEnv = "METRICS_DOMAIN"
)
View Source
const (
	// DefaultLogURLTemplate is used to set the default log url template
	DefaultLogURLTemplate = ""

	// DefaultRequestLogTemplate is the default format for emitting request logs.
	DefaultRequestLogTemplate = `` /* 497-byte string literal not displayed */

	// ReqLogTemplateKey is the CM key for the request log template.
	ReqLogTemplateKey = "logging.request-log-template"

	// EnableReqLogKey is the CM key to enable request log.
	EnableReqLogKey = "logging.enable-request-log"

	// EnableProbeReqLogKey is the CM key to enable request logs for probe requests.
	EnableProbeReqLogKey = "logging.enable-probe-request-log"
)

Variables

View Source
var (
	// TestOverrideBundleCount is a variable for testing to reduce the size (number of metrics) buffered before
	// OpenCensus will send a bundled metric report. Only applies if non-zero.
	TestOverrideBundleCount = 0
)

Functions

func Buckets125

func Buckets125(low, high float64) []float64

Buckets125 generates an array of buckets with approximate powers-of-two buckets that also aligns with powers of 10 on every 3rd step. This can be used to create a view.Distribution.

func BucketsNBy10

func BucketsNBy10(low float64, n int) []float64

BucketsNBy10 generates an array of N buckets starting from low and multiplying by 10 n times.

func ClearMetersForTest

func ClearMetersForTest()

ClearMetersForTest clears the internal set of metrics being exported, including cleaning up background threads, and restarts cleanup thread.

If a replacement clock is desired, it should be in allMeters.clock before calling.

func ConfigMapName

func ConfigMapName() string

ConfigMapName gets the name of the metrics ConfigMap

func ConfigMapWatcher

func ConfigMapWatcher(ctx context.Context, component string, secrets SecretFetcher, logger *zap.SugaredLogger) func(*corev1.ConfigMap)

ConfigMapWatcher returns a helper func which updates the exporter configuration based on values in the supplied ConfigMap. This method captures a corev1.SecretLister which is used to configure mTLS with the opencensus agent.

func Domain

func Domain() string

Domain holds the metrics domain to use for surfacing metrics.

func FlushExporter

func FlushExporter() bool

FlushExporter waits for exported data to be uploaded. This should be called before the process shuts down or exporter is replaced. Return value indicates whether the exporter is flushable or not.

func InitForTesting

func InitForTesting()

InitForTesting initialize the necessary global variables for unit tests.

func MaybeInsertBoolTag

func MaybeInsertBoolTag(key tag.Key, value, cond bool) tag.Mutator

MaybeInsertBoolTag conditionally insert the tag when cond is true.

func MaybeInsertIntTag

func MaybeInsertIntTag(key tag.Key, value int, cond bool) tag.Mutator

MaybeInsertIntTag conditionally insert the tag when cond is true.

func MaybeInsertStringTag

func MaybeInsertStringTag(key tag.Key, value string, cond bool) tag.Mutator

MaybeInsertStringTag conditionally insert the tag when cond is true.

func MemStatsOrDie

func MemStatsOrDie(ctx context.Context)

MemStatsOrDie sets up reporting on Go memory usage every 30 seconds or dies by calling log.Fatalf.

func OptionsToJSON

func OptionsToJSON(opts *ExporterOptions) (string, error)

OptionsToJSON converts an ExporterOptions object to a JSON string.

func Record

func Record(ctx context.Context, ms stats.Measurement, ros ...stats.Options)

Record stores the given Measurement from `ms` in the current metrics backend.

func RecordBatch

func RecordBatch(ctx context.Context, mss ...stats.Measurement)

RecordBatch stores the given Measurements from `mss` in the current metrics backend. All metrics should be reported using the same Resource.

func RegisterResourceView

func RegisterResourceView(views ...*view.View) error

RegisterResourceView is similar to view.Register(), except that it will register the view across all Resources tracked by the system, rather than simply the default view.

func ResponseCodeClass

func ResponseCodeClass(responseCode int) string

ResponseCodeClass converts an HTTP response code to a string representing its response code class. E.g., The response code class is "5xx" for response code 503.

func UnregisterResourceView

func UnregisterResourceView(views ...*view.View)

UnregisterResourceView is similar to view.Unregister(), except that it will unregister the view across all Resources tracked byt he system, rather than simply the default view.

func UpdateExporter

func UpdateExporter(ctx context.Context, ops ExporterOptions, logger *zap.SugaredLogger) error

UpdateExporter updates the exporter based on the given ExporterOptions. This is a thread-safe function. The entire series of operations is locked to prevent a race condition between reading the current configuration and updating the current exporter.

func UpdateExporterFromConfigMap deprecated

func UpdateExporterFromConfigMap(ctx context.Context, component string, logger *zap.SugaredLogger) func(configMap *corev1.ConfigMap)

UpdateExporterFromConfigMap returns a helper func that can be used to update the exporter when a config map is updated.

Deprecated: Callers should migrate to ConfigMapWatcher.

func UpdateExporterFromConfigMapWithOpts

func UpdateExporterFromConfigMapWithOpts(ctx context.Context, opts ExporterOptions, logger *zap.SugaredLogger) (func(configMap *corev1.ConfigMap), error)

UpdateExporterFromConfigMapWithOpts returns a helper func that can be used to update the exporter when a config map is updated. opts.Component must be present. opts.ConfigMap must not be present as the value from the ConfigMap will be used instead.

func WithConfig

func WithConfig(ctx context.Context, cfg *ObservabilityConfig) context.Context

WithConfig associates a observability configuration with the context.

Types

type ClientProvider

type ClientProvider struct {
	Latency *stats.Float64Measure
	Result  *stats.Int64Measure
}

ClientProvider implements the pattern of Kubernetes MetricProvider that may be used to produce suitable metrics for use with metrics.Register()

func (*ClientProvider) DefaultViews

func (cp *ClientProvider) DefaultViews() []*view.View

DefaultViews returns a list of views suitable for passing to view.Register

func (*ClientProvider) LatencyView

func (cp *ClientProvider) LatencyView() *view.View

LatencyView returns a view of the Latency metric.

func (*ClientProvider) NewLatencyMetric

func (cp *ClientProvider) NewLatencyMetric() metrics.LatencyMetric

NewLatencyMetric implements MetricsProvider

func (*ClientProvider) NewResultMetric

func (cp *ClientProvider) NewResultMetric() metrics.ResultMetric

NewResultMetric implements MetricsProvider

func (*ClientProvider) ResultView

func (cp *ClientProvider) ResultView() *view.View

ResultView returns a view of the Result metric.

type ExporterOptions

type ExporterOptions struct {

	// TODO - using this as a prefix is being discussed here:
	//        https://github.com/knative/pkg/issues/2174
	//
	// OpenCensus uses the following format to construct full metric name:
	//    <domain>/<component>/<metric name from View>
	// Prometheus uses the following format to construct full metric name:
	//    <component>_<metric name from View>
	// Domain is actually not used if metrics backend is Prometheus.
	Domain string

	// Component is the name of the component that emits the metrics. e.g.
	// "activator", "queue_proxy". Should only contains alphabets and underscore.
	// Must be present.
	Component string

	// PrometheusPort is the port to expose metrics if metrics backend is Prometheus.
	// It should be between maxPrometheusPort and maxPrometheusPort. 0 value means
	// using the default 9090 value. It is ignored if metrics backend is not
	// Prometheus.
	PrometheusPort int

	// PrometheusHost is the host to expose metrics on if metrics backend is Prometheus.
	// The default value is "0.0.0.0". It is ignored if metrics backend is not
	// Prometheus.
	PrometheusHost string

	// ConfigMap is the data from config map config-observability. Must be present.
	// See https://github.com/knative/serving/blob/main/config/config-observability.yaml
	// for details.
	ConfigMap map[string]string

	// A lister for Secrets to allow dynamic configuration of outgoing TLS client cert.
	Secrets SecretFetcher `json:"-"`
}

ExporterOptions contains options for configuring the exporter.

func JSONToOptions

func JSONToOptions(jsonOpts string) (*ExporterOptions, error)

JSONToOptions converts a json string to ExporterOptions.

type MemStatsProvider

type MemStatsProvider struct {
	// Alloc is bytes of allocated heap objects.
	//
	// This is the same as HeapAlloc (see below).
	Alloc *stats.Int64Measure

	// TotalAlloc is cumulative bytes allocated for heap objects.
	//
	// TotalAlloc increases as heap objects are allocated, but
	// unlike Alloc and HeapAlloc, it does not decrease when
	// objects are freed.
	TotalAlloc *stats.Int64Measure

	// Sys is the total bytes of memory obtained from the OS.
	//
	// Sys is the sum of the XSys fields below. Sys measures the
	// virtual address space reserved by the Go runtime for the
	// heap, stacks, and other internal data structures. It's
	// likely that not all of the virtual address space is backed
	// by physical memory at any given moment, though in general
	// it all was at some point.
	Sys *stats.Int64Measure

	// Lookups is the number of pointer lookups performed by the
	// runtime.
	//
	// This is primarily useful for debugging runtime internals.
	Lookups *stats.Int64Measure

	// Mallocs is the cumulative count of heap objects allocated.
	// The number of live objects is Mallocs - Frees.
	Mallocs *stats.Int64Measure

	// Frees is the cumulative count of heap objects freed.
	Frees *stats.Int64Measure

	// HeapAlloc is bytes of allocated heap objects.
	//
	// "Allocated" heap objects include all reachable objects, as
	// well as unreachable objects that the garbage collector has
	// not yet freed. Specifically, HeapAlloc increases as heap
	// objects are allocated and decreases as the heap is swept
	// and unreachable objects are freed. Sweeping occurs
	// incrementally between GC cycles, so these two processes
	// occur simultaneously, and as a result HeapAlloc tends to
	// change smoothly (in contrast with the sawtooth that is
	// typical of stop-the-world garbage collectors).
	HeapAlloc *stats.Int64Measure

	// HeapSys is bytes of heap memory obtained from the OS.
	//
	// HeapSys measures the amount of virtual address space
	// reserved for the heap. This includes virtual address space
	// that has been reserved but not yet used, which consumes no
	// physical memory, but tends to be small, as well as virtual
	// address space for which the physical memory has been
	// returned to the OS after it became unused (see HeapReleased
	// for a measure of the latter).
	//
	// HeapSys estimates the largest size the heap has had.
	HeapSys *stats.Int64Measure

	// HeapIdle is bytes in idle (unused) spans.
	//
	// Idle spans have no objects in them. These spans could be
	// (and may already have been) returned to the OS, or they can
	// be reused for heap allocations, or they can be reused as
	// stack memory.
	//
	// HeapIdle minus HeapReleased estimates the amount of memory
	// that could be returned to the OS, but is being retained by
	// the runtime so it can grow the heap without requesting more
	// memory from the OS. If this difference is significantly
	// larger than the heap size, it indicates there was a recent
	// transient spike in live heap size.
	HeapIdle *stats.Int64Measure

	// HeapInuse is bytes in in-use spans.
	//
	// In-use spans have at least one object in them. These spans
	// can only be used for other objects of roughly the same
	// size.
	//
	// HeapInuse minus HeapAlloc estimates the amount of memory
	// that has been dedicated to particular size classes, but is
	// not currently being used. This is an upper bound on
	// fragmentation, but in general this memory can be reused
	// efficiently.
	HeapInuse *stats.Int64Measure

	// HeapReleased is bytes of physical memory returned to the OS.
	//
	// This counts heap memory from idle spans that was returned
	// to the OS and has not yet been reacquired for the heap.
	HeapReleased *stats.Int64Measure

	// HeapObjects is the number of allocated heap objects.
	//
	// Like HeapAlloc, this increases as objects are allocated and
	// decreases as the heap is swept and unreachable objects are
	// freed.
	HeapObjects *stats.Int64Measure

	// StackInuse is bytes in stack spans.
	//
	// In-use stack spans have at least one stack in them. These
	// spans can only be used for other stacks of the same size.
	//
	// There is no StackIdle because unused stack spans are
	// returned to the heap (and hence counted toward HeapIdle).
	StackInuse *stats.Int64Measure

	// StackSys is bytes of stack memory obtained from the OS.
	//
	// StackSys is StackInuse, plus any memory obtained directly
	// from the OS for OS thread stacks (which should be minimal).
	StackSys *stats.Int64Measure

	// MSpanInuse is bytes of allocated mspan structures.
	MSpanInuse *stats.Int64Measure

	// MSpanSys is bytes of memory obtained from the OS for mspan
	// structures.
	MSpanSys *stats.Int64Measure

	// MCacheInuse is bytes of allocated mcache structures.
	MCacheInuse *stats.Int64Measure

	// MCacheSys is bytes of memory obtained from the OS for
	// mcache structures.
	MCacheSys *stats.Int64Measure

	// BuckHashSys is bytes of memory in profiling bucket hash tables.
	BuckHashSys *stats.Int64Measure

	// GCSys is bytes of memory in garbage collection metadata.
	GCSys *stats.Int64Measure

	// OtherSys is bytes of memory in miscellaneous off-heap
	// runtime allocations.
	OtherSys *stats.Int64Measure

	// NextGC is the target heap size of the next GC cycle.
	//
	// The garbage collector's goal is to keep HeapAlloc ≤ NextGC.
	// At the end of each GC cycle, the target for the next cycle
	// is computed based on the amount of reachable data and the
	// value of GOGC.
	NextGC *stats.Int64Measure

	// LastGC is the time the last garbage collection finished, as
	// nanoseconds since 1970 (the UNIX epoch).
	LastGC *stats.Int64Measure

	// PauseTotalNs is the cumulative nanoseconds in GC
	// stop-the-world pauses since the program started.
	//
	// During a stop-the-world pause, all goroutines are paused
	// and only the garbage collector can run.
	PauseTotalNs *stats.Int64Measure

	// NumGC is the number of completed GC cycles.
	NumGC *stats.Int64Measure

	// NumForcedGC is the number of GC cycles that were forced by
	// the application calling the GC function.
	NumForcedGC *stats.Int64Measure

	// GCCPUFraction is the fraction of this program's available
	// CPU time used by the GC since the program started.
	//
	// GCCPUFraction is expressed as a number between 0 and 1,
	// where 0 means GC has consumed none of this program's CPU. A
	// program's available CPU time is defined as the integral of
	// GOMAXPROCS since the program started. That is, if
	// GOMAXPROCS is 2 and a program has been running for 10
	// seconds, its "available CPU" is 20 seconds. GCCPUFraction
	// does not include CPU time used for write barrier activity.
	//
	// This is the same as the fraction of CPU reported by
	// GODEBUG=gctrace=1.
	GCCPUFraction *stats.Float64Measure
}

MemStatsProvider is used to expose metrics based on Go's runtime.MemStats. The fields below (and their comments) are a filtered list taken from Go's runtime.MemStats.

func NewMemStatsAll

func NewMemStatsAll() *MemStatsProvider

NewMemStatsAll creates a new MemStatsProvider with stats for all of the supported Go runtime.MemStat fields.

func (*MemStatsProvider) DefaultViews

func (msp *MemStatsProvider) DefaultViews() (views []*view.View)

DefaultViews returns a list of views suitable for passing to view.Register

func (*MemStatsProvider) Start

func (msp *MemStatsProvider) Start(ctx context.Context, period time.Duration)

Start initiates a Go routine that starts pushing metrics into the provided measures.

type ObservabilityConfig

type ObservabilityConfig struct {
	// EnableVarLogCollection specifies whether the logs under /var/log/ should be available
	// for collection on the host node by the fluentd daemon set.
	EnableVarLogCollection bool

	// LoggingURLTemplate is a string containing the logging url template where
	// the variable REVISION_UID will be replaced with the created revision's UID.
	LoggingURLTemplate string

	// RequestLogTemplate is the go template to use to shape the request logs.
	RequestLogTemplate string

	// EnableProbeRequestLog enables queue-proxy to write health check probe request logs.
	EnableProbeRequestLog bool

	// RequestMetricsBackend specifies the request metrics destination, e.g. Prometheus or
	// OpenCensus. "None" disables all backends.
	RequestMetricsBackend string

	// RequestMetricsReportingPeriodSeconds specifies the request metrics reporting period in sec at queue proxy, eg 1.
	// If a zero or negative value is passed the default reporting period is used (10 secs).
	RequestMetricsReportingPeriodSeconds int

	// EnableProfiling indicates whether it is allowed to retrieve runtime profiling data from
	// the pods via an HTTP server in the format expected by the pprof visualization tool.
	EnableProfiling bool

	// EnableRequestLog enables activator/queue-proxy to write request logs.
	EnableRequestLog bool

	// MetricsCollectorAddress specifies the metrics collector address. This is only used
	// when the metrics backend is opencensus.
	MetricsCollectorAddress string
}

ObservabilityConfig contains the configuration defined in the observability ConfigMap. +k8s:deepcopy-gen=true

func GetObservabilityConfig

func GetObservabilityConfig(ctx context.Context) *ObservabilityConfig

GetObservability gets the observability config from the provided context.

func NewObservabilityConfigFromConfigMap

func NewObservabilityConfigFromConfigMap(configMap *corev1.ConfigMap) (*ObservabilityConfig, error)

NewObservabilityConfigFromConfigMap creates a ObservabilityConfig from the supplied ConfigMap

func (*ObservabilityConfig) DeepCopy

func (in *ObservabilityConfig) DeepCopy() *ObservabilityConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservabilityConfig.

func (*ObservabilityConfig) DeepCopyInto

func (in *ObservabilityConfig) DeepCopyInto(out *ObservabilityConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ObservabilityConfig) GetConfigMap

func (oc *ObservabilityConfig) GetConfigMap() corev1.ConfigMap

type ResourceExporterFactory

type ResourceExporterFactory func(*resource.Resource) (view.Exporter, error)

ResourceExporterFactory provides a hook for producing separate view.Exporters for each observed Resource. This is needed because OpenCensus support for Resources is a bit tacked-on rather than being a first-class component like Tags are.

type SecretFetcher

type SecretFetcher func(string) (*corev1.Secret, error)

SecretFetcher is a function (extracted from SecretNamespaceLister) for fetching a specific Secret. This avoids requiring global or namespace list in controllers.

type WorkqueueProvider

type WorkqueueProvider struct {
	Adds                           *stats.Int64Measure
	Depth                          *stats.Int64Measure
	Latency                        *stats.Float64Measure
	UnfinishedWorkSeconds          *stats.Float64Measure
	LongestRunningProcessorSeconds *stats.Float64Measure
	Retries                        *stats.Int64Measure
	WorkDuration                   *stats.Float64Measure
}

WorkqueueProvider implements workqueue.MetricsProvider and may be used with workqueue.SetProvider to have metrics exported to the provided metrics.

func (*WorkqueueProvider) AddsView

func (wp *WorkqueueProvider) AddsView() *view.View

AddsView returns a view of the Adds metric.

func (*WorkqueueProvider) DefaultViews

func (wp *WorkqueueProvider) DefaultViews() []*view.View

DefaultViews returns a list of views suitable for passing to view.Register

func (*WorkqueueProvider) DepthView

func (wp *WorkqueueProvider) DepthView() *view.View

DepthView returns a view of the Depth metric.

func (*WorkqueueProvider) LatencyView

func (wp *WorkqueueProvider) LatencyView() *view.View

LatencyView returns a view of the Latency metric.

func (*WorkqueueProvider) LongestRunningProcessorSecondsView

func (wp *WorkqueueProvider) LongestRunningProcessorSecondsView() *view.View

LongestRunningProcessorSecondsView returns a view of the LongestRunningProcessorSeconds metric.

func (*WorkqueueProvider) NewAddsMetric

func (wp *WorkqueueProvider) NewAddsMetric(name string) workqueue.CounterMetric

NewAddsMetric implements MetricsProvider

func (*WorkqueueProvider) NewDeprecatedAddsMetric

func (wp *WorkqueueProvider) NewDeprecatedAddsMetric(name string) workqueue.CounterMetric

NewDeprecatedAddsMetric implements MetricsProvider

func (*WorkqueueProvider) NewDeprecatedDepthMetric

func (wp *WorkqueueProvider) NewDeprecatedDepthMetric(name string) workqueue.GaugeMetric

NewDeprecatedDepthMetric implements MetricsProvider

func (*WorkqueueProvider) NewDeprecatedLatencyMetric

func (wp *WorkqueueProvider) NewDeprecatedLatencyMetric(name string) workqueue.SummaryMetric

NewDeprecatedLatencyMetric implements MetricsProvider

func (*WorkqueueProvider) NewDeprecatedLongestRunningProcessorMicrosecondsMetric

func (wp *WorkqueueProvider) NewDeprecatedLongestRunningProcessorMicrosecondsMetric(name string) workqueue.SettableGaugeMetric

NewDeprecatedLongestRunningProcessorMicrosecondsMetric implements MetricsProvider

func (*WorkqueueProvider) NewDeprecatedRetriesMetric

func (wp *WorkqueueProvider) NewDeprecatedRetriesMetric(name string) workqueue.CounterMetric

NewDeprecatedRetriesMetric implements MetricsProvider

func (*WorkqueueProvider) NewDeprecatedUnfinishedWorkSecondsMetric

func (wp *WorkqueueProvider) NewDeprecatedUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric

NewDeprecatedUnfinishedWorkSecondsMetric implements MetricsProvider

func (*WorkqueueProvider) NewDeprecatedWorkDurationMetric

func (wp *WorkqueueProvider) NewDeprecatedWorkDurationMetric(name string) workqueue.SummaryMetric

NewDeprecatedWorkDurationMetric implements MetricsProvider

func (*WorkqueueProvider) NewDepthMetric

func (wp *WorkqueueProvider) NewDepthMetric(name string) workqueue.GaugeMetric

NewDepthMetric implements MetricsProvider

func (*WorkqueueProvider) NewLatencyMetric

func (wp *WorkqueueProvider) NewLatencyMetric(name string) workqueue.HistogramMetric

NewLatencyMetric implements MetricsProvider

func (*WorkqueueProvider) NewLongestRunningProcessorSecondsMetric

func (wp *WorkqueueProvider) NewLongestRunningProcessorSecondsMetric(name string) workqueue.SettableGaugeMetric

NewLongestRunningProcessorSecondsMetric implements MetricsProvider

func (*WorkqueueProvider) NewRetriesMetric

func (wp *WorkqueueProvider) NewRetriesMetric(name string) workqueue.CounterMetric

NewRetriesMetric implements MetricsProvider

func (*WorkqueueProvider) NewUnfinishedWorkSecondsMetric

func (wp *WorkqueueProvider) NewUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric

NewUnfinishedWorkSecondsMetric implements MetricsProvider

func (*WorkqueueProvider) NewWorkDurationMetric

func (wp *WorkqueueProvider) NewWorkDurationMetric(name string) workqueue.HistogramMetric

NewWorkDurationMetric implements MetricsProvider

func (*WorkqueueProvider) RetriesView

func (wp *WorkqueueProvider) RetriesView() *view.View

RetriesView returns a view of the Retries metric.

func (*WorkqueueProvider) UnfinishedWorkSecondsView

func (wp *WorkqueueProvider) UnfinishedWorkSecondsView() *view.View

UnfinishedWorkSecondsView returns a view of the UnfinishedWorkSeconds metric.

func (*WorkqueueProvider) WorkDurationView

func (wp *WorkqueueProvider) WorkDurationView() *view.View

WorkDurationView returns a view of the WorkDuration metric.

Directories

Path Synopsis
Package metricstest simplifies some of the common boilerplate around testing metrics exports.
Package metricstest simplifies some of the common boilerplate around testing metrics exports.

Jump to

Keyboard shortcuts

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