metrics

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SagaTimeoutCounter = newSagaTimeoutCounter()

SagaTimeoutCounter is the prometheus counter counting timed out saga instances

Functions

func AddHandlerMetrics

func AddHandlerMetrics(handlerName string)

AddHandlerMetrics adds a handler to be tracked with metrics

func GetFailureCountByMessageTypeAndHandlerName added in v1.1.2

func GetFailureCountByMessageTypeAndHandlerName(messageType, handlerName string) (float64, error)

GetFailureCountByMessageTypeAndHandlerName gets the counter value for the failed handlers' run for a given message type and handler's name

func GetHandlerMetrics

func GetHandlerMetrics(handlerName string) *handlerMetrics

GetHandlerMetrics gets the metrics handler associated with the handlerName

func GetLatencySampleCountByMessageTypeAndHandlerName added in v1.1.2

func GetLatencySampleCountByMessageTypeAndHandlerName(messageType, handlerName string) (*uint64, error)

GetLatencySampleCountByMessageTypeAndHandlerName gets the summary sample count value for the handlers' run for a given message type and handler's name

func GetRejectedMessagesValue

func GetRejectedMessagesValue() (float64, error)

GetRejectedMessagesValue gets the value of the rejected message counter

func GetSagaTimeoutCounterValue

func GetSagaTimeoutCounterValue() (float64, error)

GetSagaTimeoutCounterValue gets the counter value of timed out sagas reported to prometheus

func GetSuccessCountByMessageTypeAndHandlerName added in v1.1.2

func GetSuccessCountByMessageTypeAndHandlerName(messageType, handlerName string) (float64, error)

GetSuccessCountByMessageTypeAndHandlerName gets the counter value for the successful handlers' run for a given message type and handler's name

func ReportRejectedMessage

func ReportRejectedMessage()

ReportRejectedMessage reports a message being rejected to the metrics counter

func ResetRejectedMessagesCounter added in v1.1.1

func ResetRejectedMessagesCounter()

ResetRejectedMessagesCounter resets the counter intended to be used in tests only

func RunHandlerWithMetric

func RunHandlerWithMetric(handleMessage func() error, handlerName, messageType string, logger logrus.FieldLogger) error

RunHandlerWithMetric runs a specific handler with metrics being collected and reported to prometheus

Types

This section is empty.

Jump to

Keyboard shortcuts

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