promsql

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabaseCollector

func NewDatabaseCollector(db dbStats, opts DatabaseCollectorOpts) *databaseCollector

Types

type DatabaseCollectorOpts

type DatabaseCollectorOpts struct {
	Prefix string
}

type DriverCollector

type DriverCollector struct {
	DriverName string

	// prometheus counters
	QueryTotalCounter                    prometheus.Counter
	QuerySuccessfulCounter               prometheus.Counter
	QueryFailedCounter                   prometheus.Counter
	TransactionCommitTotalCounter        prometheus.Counter
	TransactionCommitSuccessfulCounter   prometheus.Counter
	TransactionCommitFailedCounter       prometheus.Counter
	TransactionRollbackTotalCounter      prometheus.Counter
	TransactionRollbackSuccessfulCounter prometheus.Counter
	TransactionRollbackFailedCounter     prometheus.Counter
	ExecutionTotalCounter                prometheus.Counter
	ExecutionSuccessfulCounter           prometheus.Counter
	ExecutionFailedCounter               prometheus.Counter
	// contains filtered or unexported fields
}

func NewDriverCollector

func NewDriverCollector(driver driver.Driver, opts DriverCollectorOpts) *DriverCollector

func Register

func Register(options DriverCollectorOpts) (*DriverCollector, error)

func Wrap

func (*DriverCollector) Collect

func (collector *DriverCollector) Collect(metrics chan<- prometheus.Metric)

func (*DriverCollector) Describe

func (collector *DriverCollector) Describe(descs chan<- *prometheus.Desc)

func (*DriverCollector) Open

func (d *DriverCollector) Open(name string) (driver.Conn, error)

type DriverCollectorOpts

type DriverCollectorOpts struct {
	DriverName string
	Prefix     string
}

Jump to

Keyboard shortcuts

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