metric

package
v0.0.0-...-1825ddb Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KafkaServerReceivedBytes     = New("io.confluent.kafka.server/received_bytes", labels.MetricTopic, labels.MetricPartition)
	KafkaServerSentBytes         = New("io.confluent.kafka.server/sent_bytes", labels.MetricTopic, labels.MetricPartition)
	KafkaServerReceivedRecords   = New("io.confluent.kafka.server/received_records", labels.MetricTopic, labels.MetricPartition)
	KafkaServerSentRecords       = New("io.confluent.kafka.server/sent_records", labels.MetricTopic, labels.MetricPartition)
	KafkaServerRetainedBytes     = New("io.confluent.kafka.server/retained_bytes", labels.MetricTopic, labels.MetricPartition)
	KafkaServerActiveConnections = New("io.confluent.kafka.server/active_connection_count")
	KafkaServerRequests          = New("io.confluent.kafka.server/request_count", labels.MetricType)
	KafkaServerPartition         = New("io.confluent.kafka.server/partition_count")
	KafkaServerSuccessAuth       = New("io.confluent.kafka.server/successful_authentication_count")

	KSQLStreamingUnitCount = New("io.confluent.kafka.ksql/streaming_unit_count")

	SchemaRegSchemaCount = New("io.confluent.kafka.schema_registry/schema_count")

	ConnectorSentRecords            = New("io.confluent.kafka.connect/sent_records")
	ConnectorReceivedRecords        = New("io.confluent.kafka.connect/received_records")
	ConnectorSentBytes              = New("io.confluent.kafka.connect/sent_bytes")
	ConnectorReceivedBytes          = New("io.confluent.kafka.connect/received_bytes")
	ConnectorDeadLetterQueueRecords = New("io.confluent.kafka.connect/dead_letter_queue_records")

	KnownKafkaServerMetrics = []Metric{
		KafkaServerReceivedBytes,
		KafkaServerSentBytes,
		KafkaServerReceivedRecords,
		KafkaServerSentRecords,
		KafkaServerRetainedBytes,
		KafkaServerActiveConnections,
		KafkaServerRequests,
		KafkaServerPartition,
		KafkaServerSuccessAuth,
	}

	KnownKSQLMetrics = []Metric{
		KSQLStreamingUnitCount,
	}

	KnownSchemaRegMetrics = []Metric{
		SchemaRegSchemaCount,
	}

	KnownConnectorMetrics = []Metric{
		ConnectorSentRecords,
		ConnectorReceivedRecords,
		ConnectorSentBytes,
		ConnectorReceivedBytes,
		ConnectorDeadLetterQueueRecords,
	}
)

Functions

This section is empty.

Types

type Metric

type Metric struct {
	Name           string          `json:"name" cjson:"name"`
	Desc           string          `json:"description,omitempty" cjson:"description,omitempty"`
	Type           string          `json:"type,omitempty" cjson:"type,omitempty"`
	LifecycleStage string          `json:"lifecycle_stage,omitempty" cjson:"lifecycle_stage,omitempty"`
	Labels         []labels.Metric `json:"labels,omitempty" cjson:"labels,omitempty"`
}

Metric is a struct to house the Metric details for a returned metric

func New

func New(name string, labels ...labels.Metric) Metric

func (Metric) MarshalJSON

func (m Metric) MarshalJSON() ([]byte, error)

func (Metric) Matches

func (m Metric) Matches(name string) bool

Matches check if a given metric name is equal to this metric

func (Metric) ShortName

func (m Metric) ShortName() string

ShortName returned a simple shorter name, without all the namespacing

Jump to

Keyboard shortcuts

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