Documentation ¶
Index ¶
- func AddCounterMetric(plugin *newrelic.Plugin, counter metrics.Counter, config MetricConfig)
- func AddGaugeMetric(plugin *newrelic.Plugin, gauge metrics.Gauge, config MetricConfig)
- func AddHistogramMetric(plugin *newrelic.Plugin, histo metrics.Histogram, config MetricConfig)
- func AddMeterMetric(plugin *newrelic.Plugin, meter metrics.Meter, config MetricConfig)
- func AddTimerMetric(plugin *newrelic.Plugin, timer metrics.Timer, config MetricConfig)
- type MetricConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCounterMetric ¶
func AddCounterMetric(plugin *newrelic.Plugin, counter metrics.Counter, config MetricConfig)
AddCounterMetric Adds various metrics based on a Counter, according to the supplied MetricConfig
func AddGaugeMetric ¶
func AddGaugeMetric(plugin *newrelic.Plugin, gauge metrics.Gauge, config MetricConfig)
AddGaugeMetric Adds various metrics based on a Gauge, according to the supplied MetricConfig.
func AddHistogramMetric ¶
func AddHistogramMetric(plugin *newrelic.Plugin, histo metrics.Histogram, config MetricConfig)
AddHistogramMetric Adds various metrics based on a Histogram, according to the supplied MetricConfig
func AddMeterMetric ¶
func AddMeterMetric(plugin *newrelic.Plugin, meter metrics.Meter, config MetricConfig)
AddMeterMetric Adds various metrics based on a Meter, according to the supplied MetricConfig
func AddTimerMetric ¶
func AddTimerMetric(plugin *newrelic.Plugin, timer metrics.Timer, config MetricConfig)
AddTimerMetric Adds various metrics based on a Timer, according to the supplied MetricConfig
Types ¶
type MetricConfig ¶
type MetricConfig struct { Name string Unit string Duration time.Duration Count bool Value bool Min bool Max bool Mean bool Percentiles []float64 Rate1 bool Rate5 bool Rate15 bool RateMean bool StdDev bool Sum bool Variance bool }
MetricConfig defines the metrics that should be created for a given metric object, including the unit name and desired time precision. For example: Name: "MyApp/Response Time", // root of the metric name Unit: "request", // the thing being timed Duration: time.Millisecond, // show the histogram values in milliseconds Count: true, // Send a total count metric (requests) Min: true, // Send a min request time metric (milliseconds) Max: true, // Send a max request time metric (milliseconds) Mean: true, // Send the avg request time (milliseconds/request) Percentiles: []float64{0.25, 0.5, 0.75, 0.9, 0.99, 0.999}, // Send these percentiles (milliseconds/request) Rate1: true, // Send the 1-minute rate, always in seconds (requests/second) Rate5: true, // Send the 5-minute rate, always in seconds (requests/second) Rate15: true, // Send the 15-minute rate, always in seconds (requests/second) RateMean: true, // Send the mean rate, always in seconds (requests/second) StdDev: true, // Send the std dev (milliseconds) Sum: true, // Send the sum of all recorded times (milliseconds) Variance: true, // Send the variance (milliseconds)