metrics

package
v0.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelPipeline           = "pipeline"
	LabelVertex             = "vertex"
	LabelPeriod             = "period"
	LabelVertexReplicaIndex = "replica"

	VertexProcessingRate  = "vertex_processing_rate"
	VertexPendingMessages = "vertex_pending_messages"
)

Variables

This section is empty.

Functions

func NewMetricsServer added in v0.5.3

func NewMetricsServer(vertex *dfv1.Vertex, opts ...Option) *metricsServer

NewMetricsServer returns a Prometheus metrics server instance, which can be used to start an HTTPS service to expose Prometheus metrics.

Types

type HealthChecker added in v0.7.1

type HealthChecker interface {
	// IsHealthy checks if the user defined container is healthy
	IsHealthy(ctx context.Context) error
}

HealthChecker is the interface to check if the user defined container is connected and ready to use

type Option added in v0.5.3

type Option func(*metricsServer)

func NewMetricsOptions added in v0.7.1

func NewMetricsOptions(ctx context.Context, vertex *dfv1.Vertex, serverHandler HealthChecker, reader isb.BufferReader, writer isb.BufferWriter) []Option

NewMetricsOptions returns a metrics option list.

func WithHealthCheckExecutor added in v0.5.6

func WithHealthCheckExecutor(f func() error) Option

WithHealthCheckExecutor appends a health check executor

func WithLagReader added in v0.5.3

func WithLagReader(r isb.LagReader) Option

WithLagReader sets the lag reader

func WithLookbackSeconds added in v0.5.3

func WithLookbackSeconds(seconds int64) Option

WithLookbackSeconds sets lookback seconds for avg rate and pending calculation

func WithRater added in v0.5.3

func WithRater(r isb.Ratable) Option

WithRater sets the rater

func WithRefreshInterval added in v0.5.3

func WithRefreshInterval(d time.Duration) Option

WithRefreshInterval sets how often to refresh the rate and pending

Jump to

Keyboard shortcuts

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