Versions in this module Expand all Collapse all v2 v2.7.1 Jan 15, 2024 v2.7.0 Jan 12, 2024 Changes in this version + var ChannelCapacity = "channel_capacity" + var ConnectedClients = "connected_clients" + var CountServers = "count_servers" + var DroppedMessages = "dropped_messages" + var ExceededRateLimiting = "exceeded_rate_limiting" + var Goroutines = "goroutines" + var HeapObjects = "heapobjects" + var HeapSize = "heapsize" + var ProcessDelay = "handler_delay_ns" + var ResponseTime = "response_time_ns" + var WorkerJobsRetry = "worker_jobs_retry_total" + var WorkerJobsTotal = "worker_jobs_total" + var WorkerQueueSize = "worker_queue_size" + func ReportExceededRateLimiting(reporters []Reporter) + func ReportMessageProcessDelayFromCtx(ctx context.Context, reporters []Reporter, typ string) + func ReportNumberOfConnectedClients(reporters []Reporter, number int64) + func ReportSysMetrics(reporters []Reporter, period time.Duration) + func ReportTimingFromCtx(ctx context.Context, reporters []Reporter, typ string, err error) + type Client interface + Count func(name string, value int64, tags []string, rate float64) error + Gauge func(name string, value float64, tags []string, rate float64) error + TimeInMilliseconds func(name string, value float64, tags []string, rate float64) error + type PrometheusReporter struct + func GetPrometheusReporter(serverType string, config config.PrometheusConfig, ...) (*PrometheusReporter, error) + func (p *PrometheusReporter) ReportCount(metric string, labels map[string]string, count float64) error + func (p *PrometheusReporter) ReportGauge(metric string, labels map[string]string, value float64) error + func (p *PrometheusReporter) ReportHistogram(metric string, labels map[string]string, value float64) error + func (p *PrometheusReporter) ReportSummary(metric string, labels map[string]string, value float64) error + type Reporter interface + ReportCount func(metric string, tags map[string]string, count float64) error + ReportGauge func(metric string, tags map[string]string, value float64) error + ReportHistogram func(metric string, tags map[string]string, value float64) error + ReportSummary func(metric string, tags map[string]string, value float64) error + type StatsdReporter struct + func NewStatsdReporter(config config.StatsdConfig, serverType string, clientOrNil ...Client) (*StatsdReporter, error) + func (s *StatsdReporter) ReportCount(metric string, tagsMap map[string]string, count float64) error + func (s *StatsdReporter) ReportGauge(metric string, tagsMap map[string]string, value float64) error + func (s *StatsdReporter) ReportHistogram(metric string, tagsMap map[string]string, value float64) error + func (s *StatsdReporter) ReportSummary(metric string, tagsMap map[string]string, value float64) error