metrics

package
v1.45.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package metrics is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinHTTPMiddleware

func GinHTTPMiddleware(metrics MetricsSvc) gin.HandlerFunc

Types

type Configuration added in v1.7.1

type Configuration struct {
	Path string
	Port string
}

type Metrics

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

func (*Metrics) Capabilities added in v1.30.0

func (s *Metrics) Capabilities() tally.Capabilities

func (*Metrics) Counter

func (s *Metrics) Counter(name string) tally.Counter

func (*Metrics) CounterWithTags

func (s *Metrics) CounterWithTags(name string, tags map[string]string) tally.Counter

func (*Metrics) Gauge

func (s *Metrics) Gauge(name string) tally.Gauge

func (*Metrics) GaugeWithTags

func (s *Metrics) GaugeWithTags(name string, tags map[string]string) tally.Gauge

func (*Metrics) GetRootScope

func (s *Metrics) GetRootScope() tally.Scope

GetRootScope gets the root scope with the configured base tags

func (*Metrics) Histogram

func (s *Metrics) Histogram(name string, buckets tally.Buckets) tally.Histogram

func (*Metrics) HistogramWithTags

func (s *Metrics) HistogramWithTags(name string, buckets tally.Buckets, tags map[string]string) tally.Histogram

func (*Metrics) SubScope added in v1.30.0

func (s *Metrics) SubScope(name string) tally.Scope

func (*Metrics) Tagged added in v1.30.0

func (s *Metrics) Tagged(tags map[string]string) tally.Scope

func (*Metrics) Timer

func (s *Metrics) Timer(name string) tally.Timer

func (*Metrics) TimerWithTags

func (s *Metrics) TimerWithTags(name string, tags map[string]string) tally.Timer

type MetricsSvc added in v1.24.1

type MetricsSvc interface {
	tally.Scope
	GetRootScope() tally.Scope
	Counter(name string) tally.Counter
	CounterWithTags(name string, tags map[string]string) tally.Counter
	Gauge(name string) tally.Gauge
	GaugeWithTags(name string, tags map[string]string) tally.Gauge
	Timer(name string) tally.Timer
	TimerWithTags(name string, tags map[string]string) tally.Timer
	Histogram(name string, buckets tally.Buckets) tally.Histogram
	HistogramWithTags(name string, buckets tally.Buckets, tags map[string]string) tally.Histogram
}

func New

New creates a metrics service that by defaults serves metrics on :3001/metrics, but is separate from the management endpoints Deprecated: this will be deleted once all apps are on the server module, where metrics will be served on the management port (defaults to the server port unless you change it)

func NewSvc added in v1.19.1

NewSvc creates an instance of the metrics service but does not start a server for metrics scraping. Serving the open metrics endpoint is handled by a management endpoint, see the management package.

type MockMetricsSvc added in v1.24.1

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

MockMetricsSvc is a mock of MetricsSvc interface.

func NewMockMetricsSvc added in v1.24.1

func NewMockMetricsSvc(ctrl *gomock.Controller) *MockMetricsSvc

NewMockMetricsSvc creates a new mock instance.

func (*MockMetricsSvc) Capabilities added in v1.30.0

func (m *MockMetricsSvc) Capabilities() tally.Capabilities

Capabilities mocks base method.

func (*MockMetricsSvc) Counter added in v1.24.1

func (m *MockMetricsSvc) Counter(name string) tally.Counter

Counter mocks base method.

func (*MockMetricsSvc) CounterWithTags added in v1.24.1

func (m *MockMetricsSvc) CounterWithTags(name string, tags map[string]string) tally.Counter

CounterWithTags mocks base method.

func (*MockMetricsSvc) EXPECT added in v1.24.1

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMetricsSvc) Gauge added in v1.24.1

func (m *MockMetricsSvc) Gauge(name string) tally.Gauge

Gauge mocks base method.

func (*MockMetricsSvc) GaugeWithTags added in v1.24.1

func (m *MockMetricsSvc) GaugeWithTags(name string, tags map[string]string) tally.Gauge

GaugeWithTags mocks base method.

func (*MockMetricsSvc) GetRootScope added in v1.24.5

func (m *MockMetricsSvc) GetRootScope() tally.Scope

GetRootScope mocks base method.

func (*MockMetricsSvc) Histogram added in v1.24.1

func (m *MockMetricsSvc) Histogram(name string, buckets tally.Buckets) tally.Histogram

Histogram mocks base method.

func (*MockMetricsSvc) HistogramWithTags added in v1.24.1

func (m *MockMetricsSvc) HistogramWithTags(name string, buckets tally.Buckets, tags map[string]string) tally.Histogram

HistogramWithTags mocks base method.

func (*MockMetricsSvc) SubScope added in v1.30.0

func (m *MockMetricsSvc) SubScope(name string) tally.Scope

SubScope mocks base method.

func (*MockMetricsSvc) Tagged added in v1.30.0

func (m *MockMetricsSvc) Tagged(tags map[string]string) tally.Scope

Tagged mocks base method.

func (*MockMetricsSvc) Timer added in v1.24.1

func (m *MockMetricsSvc) Timer(name string) tally.Timer

Timer mocks base method.

func (*MockMetricsSvc) TimerWithTags added in v1.24.1

func (m *MockMetricsSvc) TimerWithTags(name string, tags map[string]string) tally.Timer

TimerWithTags mocks base method.

type MockMetricsSvcMockRecorder added in v1.24.1

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

MockMetricsSvcMockRecorder is the mock recorder for MockMetricsSvc.

func (*MockMetricsSvcMockRecorder) Capabilities added in v1.30.0

func (mr *MockMetricsSvcMockRecorder) Capabilities() *gomock.Call

Capabilities indicates an expected call of Capabilities.

func (*MockMetricsSvcMockRecorder) Counter added in v1.24.1

func (mr *MockMetricsSvcMockRecorder) Counter(name interface{}) *gomock.Call

Counter indicates an expected call of Counter.

func (*MockMetricsSvcMockRecorder) CounterWithTags added in v1.24.1

func (mr *MockMetricsSvcMockRecorder) CounterWithTags(name, tags interface{}) *gomock.Call

CounterWithTags indicates an expected call of CounterWithTags.

func (*MockMetricsSvcMockRecorder) Gauge added in v1.24.1

func (mr *MockMetricsSvcMockRecorder) Gauge(name interface{}) *gomock.Call

Gauge indicates an expected call of Gauge.

func (*MockMetricsSvcMockRecorder) GaugeWithTags added in v1.24.1

func (mr *MockMetricsSvcMockRecorder) GaugeWithTags(name, tags interface{}) *gomock.Call

GaugeWithTags indicates an expected call of GaugeWithTags.

func (*MockMetricsSvcMockRecorder) GetRootScope added in v1.24.5

func (mr *MockMetricsSvcMockRecorder) GetRootScope() *gomock.Call

GetRootScope indicates an expected call of GetRootScope.

func (*MockMetricsSvcMockRecorder) Histogram added in v1.24.1

func (mr *MockMetricsSvcMockRecorder) Histogram(name, buckets interface{}) *gomock.Call

Histogram indicates an expected call of Histogram.

func (*MockMetricsSvcMockRecorder) HistogramWithTags added in v1.24.1

func (mr *MockMetricsSvcMockRecorder) HistogramWithTags(name, buckets, tags interface{}) *gomock.Call

HistogramWithTags indicates an expected call of HistogramWithTags.

func (*MockMetricsSvcMockRecorder) SubScope added in v1.30.0

func (mr *MockMetricsSvcMockRecorder) SubScope(name interface{}) *gomock.Call

SubScope indicates an expected call of SubScope.

func (*MockMetricsSvcMockRecorder) Tagged added in v1.30.0

func (mr *MockMetricsSvcMockRecorder) Tagged(tags interface{}) *gomock.Call

Tagged indicates an expected call of Tagged.

func (*MockMetricsSvcMockRecorder) Timer added in v1.24.1

func (mr *MockMetricsSvcMockRecorder) Timer(name interface{}) *gomock.Call

Timer indicates an expected call of Timer.

func (*MockMetricsSvcMockRecorder) TimerWithTags added in v1.24.1

func (mr *MockMetricsSvcMockRecorder) TimerWithTags(name, tags interface{}) *gomock.Call

TimerWithTags indicates an expected call of TimerWithTags.

Jump to

Keyboard shortcuts

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