statsd

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(address, prefix string) (metrics.Collector, error)

New creates a new Statsd metrics module.

Types

type DBCacheQuery

type DBCacheQuery struct {
	// contains filtered or unexported fields
}

DBCacheQuery is a database cache query metric measurer.

func (*DBCacheQuery) Done

func (d *DBCacheQuery) Done(hit, isError bool) time.Duration

Done is called when the db cache query is complete.

type DBQuery

type DBQuery struct {
	// contains filtered or unexported fields
}

DBQuery is a database query metric measurer.

func (*DBQuery) Done

func (d *DBQuery) Done(isError bool) time.Duration

Done is called when the db query is complete.

type GRPCRequest

type GRPCRequest struct {
	// contains filtered or unexported fields
}

GRPCRequest is a grpc request metric measurer.

func (*GRPCRequest) Done

func (g *GRPCRequest) Done(code int) time.Duration

Done is called when the grpc request is complete.

type HTTPRequest

type HTTPRequest struct {
	// contains filtered or unexported fields
}

HTTPRequest is a new http request metric measurer.

func (*HTTPRequest) Done

func (h *HTTPRequest) Done(status int) time.Duration

Done is called when the db query is complete.

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module represents a statsd metrics collector.

func (*Module) Close

func (m *Module) Close() error

Close closes the statsd metrics collector.

func (*Module) NewDBCacheQuery

func (m *Module) NewDBCacheQuery(name string) metrics.DBCacheQuery

NewDBCacheQuery creates a new db cache query metrics collector.

func (*Module) NewDBQuery

func (m *Module) NewDBQuery(name string) metrics.DBQuery

NewDBQuery creates a new db query metrics collector.

func (*Module) NewGRPCRequest

func (m *Module) NewGRPCRequest(method string) metrics.GRPCRequest

NewGRPCRequest creates a new grpc request metrics collector.

func (*Module) NewHTTPRequest

func (m *Module) NewHTTPRequest(method, path string) metrics.HTTPRequest

NewHTTPRequest creates a new db query metrics collector.

Jump to

Keyboard shortcuts

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