metrics

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndIncrementMetrics

func CheckAndIncrementMetrics(stickerMetric utils.StickerizationMetric, stickerCounters *StickerizationCounters)

func NewRegistry

func NewRegistry() *prometheus.Registry

Types

type MetricConsumer

type MetricConsumer struct {
	Counters StickerizationCounters
	Registry *prometheus.Registry
}

func Initialize

func Initialize(registry *prometheus.Registry, counters StickerizationCounters) MetricConsumer

func (*MetricConsumer) Consume

func (consumer *MetricConsumer) Consume(ch *amqp.Channel, delivery *amqp.Delivery)

type StickerizationCounters

type StickerizationCounters struct {
	GroupMessagesCounter   prometheus.Counter
	PrivateMessagesCounter prometheus.Counter
	ImageCounter           prometheus.Counter
	VideoCounter           prometheus.Counter
	InvalidMediaCounter    prometheus.Counter
	CountryCounter         *prometheus.CounterVec
	ValidCounter           prometheus.Counter
	InvalidCounter         prometheus.Counter
}

func NewCounters

func NewCounters() StickerizationCounters

Jump to

Keyboard shortcuts

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