Documentation ¶
Index ¶
- func GinHTTPMiddleware(metrics *Metrics) gin.HandlerFunc
- type Configuration
- type Metrics
- func (s *Metrics) Counter(name string) tally.Counter
- func (s *Metrics) CounterWithTags(name string, tags map[string]string) tally.Counter
- func (s *Metrics) Gauge(name string) tally.Gauge
- func (s *Metrics) GaugeWithTags(name string, tags map[string]string) tally.Gauge
- func (s *Metrics) GetRootScope() tally.Scope
- func (s *Metrics) Histogram(name string, buckets tally.Buckets) tally.Histogram
- func (s *Metrics) HistogramWithTags(name string, buckets tally.Buckets, tags map[string]string) tally.Histogram
- func (s *Metrics) Timer(name string) tally.Timer
- func (s *Metrics) TimerWithTags(name string, tags map[string]string) tally.Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GinHTTPMiddleware ¶
func GinHTTPMiddleware(metrics *Metrics) gin.HandlerFunc
Types ¶
type Configuration ¶ added in v1.7.1
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func New ¶
func New(lc fx.Lifecycle, log *zap.SugaredLogger, conf Configuration, app metadata.ApplicationMetadata) *Metrics
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
func NewSvc(lc fx.Lifecycle, app metadata.ApplicationMetadata) *Metrics
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.
func (*Metrics) CounterWithTags ¶
func (*Metrics) GaugeWithTags ¶
func (*Metrics) GetRootScope ¶
func (s *Metrics) GetRootScope() tally.Scope
GetRootScope gets the root scope with the configured base tags
func (*Metrics) HistogramWithTags ¶
Click to show internal directories.
Click to hide internal directories.