metrics

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package metrics contains all metrics that needs to be exposed to Prometheus and indirectly to Grafana. Currently, the following metrics are exposed:

consumed_messages - total number of messages consumed from selected broker

consuming_errors - total number of errors during consuming messages from selected broker

messages_with_empty_rule_execution_result - total number of consumed messages not processed as rule execution result is an empty report

successful_messages_processing_time - time to process successfully message

failed_messages_processing_time - time to process message fail

last_checked_timestamp_lag_minutes - shows how slow we get messages from clusters

produced_messages - total number of produced messages sent to Payload Tracker's Kafka topic

written_reports - total number of reports written into the storage (cache)

feedback_on_rules - total number of left feedback

sql_queries_counter - total number of SQL queries

sql_queries_durations - SQL queries durations

sql_recommendations_updates - number of insert and deletes in recommendations table

Index

Constants

This section is empty.

Variables

View Source
var ConsumedMessages = promauto.NewCounter(prometheus.CounterOpts{
	Name: "consumed_messages",
	Help: "The total number of messages consumed from Kafka",
})

ConsumedMessages shows number of messages consumed from Kafka by aggregator

View Source
var ConsumingErrors = promauto.NewCounter(prometheus.CounterOpts{
	Name: "consuming_errors",
	Help: "The total number of errors during consuming messages from Kafka",
})

ConsumingErrors shows the total number of errors during consuming messages from Kafka

View Source
var FailedMessagesProcessingTime = promauto.NewHistogram(prometheus.HistogramOpts{
	Name: "failed_messages_processing_time",
	Help: "Time to process message fail",
})

FailedMessagesProcessingTime collects the time of processing message when it failed

View Source
var FeedbackOnRules = promauto.NewCounter(prometheus.CounterOpts{
	Name: "feedback_on_rules",
	Help: "The total number of left feedback",
})

FeedbackOnRules shows how many times users left feedback on rules

View Source
var LastCheckedTimestampLagMinutes = promauto.NewHistogram(prometheus.HistogramOpts{
	Name: "last_checked_timestamp_lag_minutes",
	Help: "Shows how slow we get messages from clusters",
})

LastCheckedTimestampLagMinutes shows how slow we get messages from clusters

View Source
var ProducedMessages = promauto.NewCounter(prometheus.CounterOpts{
	Name: "produced_messages",
	Help: "The total number of produced messages sent to Payload Tracker's Kafka topic",
})

ProducedMessages shows number of messages produced by producer package probably it will be used only in tests

View Source
var RatingOnRules = promauto.NewCounter(prometheus.CounterOpts{
	Name: "rating_on_rules",
	Help: "The total number of left rating",
})

RatingOnRules shows how many times users sends a rating on rules

View Source
var SQLQueriesCounter = promauto.NewCounter(prometheus.CounterOpts{
	Name: "sql_queries_counter",
	Help: "Number of SQL queries",
})

SQLQueriesCounter shows number of sql queries

View Source
var SQLQueriesDurations = promauto.NewHistogramVec(prometheus.HistogramOpts{
	Name: "sql_queries_durations",
	Help: "SQL queries durations",
}, []string{"query"})

SQLQueriesDurations shows durations for sql queries (without parameters).

View Source
var SkippedEmptyReports = promauto.NewCounter(prometheus.CounterOpts{
	Name: "messages_with_empty_rule_execution_result",
	Help: "The total number of consumed messages not processed as the rule execution resulted in an empty report",
})

SkippedEmptyReports shows the total number of consumed messages not processed as the rule execution resulted in an empty report

View Source
var SuccessfulMessagesProcessingTime = promauto.NewHistogram(prometheus.HistogramOpts{
	Name: "successful_messages_processing_time",
	Help: "Time to process successfully message",
})

SuccessfulMessagesProcessingTime collects the time to process message successfully

View Source
var WrittenReports = promauto.NewCounter(prometheus.CounterOpts{
	Name: "written_reports",
	Help: "The total number of reports written to the storage",
})

WrittenReports shows number of reports written into the database

Functions

func AddMetricsWithNamespace added in v1.1.0

func AddMetricsWithNamespace(namespace string)

AddMetricsWithNamespace register the desired metrics using a given namespace

Types

This section is empty.

Jump to

Keyboard shortcuts

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