metric

package
v0.3.16 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: Apache-2.0 Imports: 4 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"
)

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                  metrics.Counter   `name:"db_queries_total"`
	QueryDurationSeconds     metrics.Histogram `name:"db_query_duration_seconds"`
	DynamodbConsumedCapacity metrics.Counter   `name:"dynamodb_consumed_capacity_total"`
}

Jump to

Keyboard shortcuts

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