metric

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Common across data backends.
	QueryDurationSecondsHistogram = "db_query_duration_seconds"
	QueriesCounter                = "db_queries_total"

	// DynamoDB-specific metrics.
	DynamodbConsumedCapacityCounter = "dynamodb_consumed_capacity_total"
	DynamodbGetAllGauge             = "dynamodb_get_all_results"
)

Metric names.

View Source
const (
	QueryOutcomeLabelKey     = "outcome"
	QueryTypeLabelKey        = "type"
	DynamoCapacityOpLabelKey = "op"
)

Metric label keys.

View Source
const (
	GetQueryType    = "get"
	GetAllQueryType = "getall"
	DeleteQueryType = "delete"
	PushQueryType   = "push"
	PingQueryType   = "ping"
)

Metric label values for DAO operation types.

View Source
const (
	FailQueryOutcome    = "fail"
	SuccessQueryOutcome = "success"
)

Metric label values for Query Outcomes.

View Source
const (
	DynamoCapacityReadOp  = "read"
	DynamoCapacityWriteOp = "write"
)

Metric label values for DynamoDB Consumed capacity type

Variables

This section is empty.

Functions

func ProvideMetrics

func ProvideMetrics() fx.Option

ProvideMetrics returns the Metrics relevant to this package

Types

type Measures

type Measures struct {
	fx.In
	Queries                  *prometheus.CounterVec `name:"db_queries_total"`
	QueryDurationSeconds     prometheus.ObserverVec `name:"db_query_duration_seconds"`
	DynamodbConsumedCapacity *prometheus.CounterVec `name:"dynamodb_consumed_capacity_total"`
	DynamodbGetAllGauge      prometheus.Gauge       `name:"dynamodb_get_all_results"`
}

Jump to

Keyboard shortcuts

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