package stats

import "github.com/uber/tchannel-go/stats"

Index

Variables

var MetricKey = DefaultMetricPrefix

MetricKey is called to generate the statsd key for a given metric and tags.

Functions

func DefaultMetricPrefix

func DefaultMetricPrefix(name string, tags map[string]string) string

DefaultMetricPrefix is the default mapping for metrics to statsd keys. It uses a "tchannel" prefix for all stats.

func MetricWithPrefix

func MetricWithPrefix(prefix, name string, tags map[string]string) string

MetricWithPrefix is the default mapping for metrics to statsd keys.

func NewStatsdReporter

func NewStatsdReporter(addr, prefix string) (tchannel.StatsReporter, error)

NewStatsdReporter returns a StatsReporter that reports to statsd on the given addr.

func NewStatsdReporterClient

func NewStatsdReporterClient(client statsd.Statter) tchannel.StatsReporter

NewStatsdReporterClient returns a StatsReporter that reports stats to the given client.

func NewTallyReporter

func NewTallyReporter(scope tally.Scope) tchannel.StatsReporter

NewTallyReporter takes a tally.Scope and wraps it so it ca be used as a StatsReporter. The list of metrics emitted is documented on: https://tchannel.readthedocs.io/en/latest/metrics/ The metrics emitted are similar to YARPC, the tags emitted are: source, dest, procedure, and retry-count.

Source Files

metrickey.go statsdreporter.go tally.go

Version
v1.34.6 (latest)
Published
Jan 8, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
4 days ago

Tools for package owners.