Java Code Examples for com.spotify.metrics.core.MetricId#join()
The following examples show how to use
com.spotify.metrics.core.MetricId#join() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FastForwardReporter.java From semantic-metrics with Apache License 2.0 | 5 votes |
private void reportGauge( MetricId key, @SuppressWarnings("rawtypes") Gauge value ) { key = MetricId.join(prefix, key); final Metric m = FastForward .metric(key.getKey()) .attributes(key.getTags()) .attribute(METRIC_TYPE, "gauge"); send(m.value(convert(value.getValue()))); }
Example 2
Source File: FastForwardReporter.java From semantic-metrics with Apache License 2.0 | 5 votes |
private void reportCounter(MetricId key, Counting value) { key = MetricId.join(prefix, key); final Metric m = FastForward .metric(key.getKey()) .attributes(key.getTags()) .attribute(METRIC_TYPE, "counter"); send(m.value(value.getCount())); }
Example 3
Source File: FastForwardReporter.java From semantic-metrics with Apache License 2.0 | 5 votes |
private void reportHistogram(MetricId key, Histogram value) { key = MetricId.join(prefix, key); final Metric m = FastForward .metric(key.getKey()) .attributes(key.getTags()) .attribute(METRIC_TYPE, "histogram"); reportHistogram(m, value.getSnapshot()); }
Example 4
Source File: FastForwardReporter.java From semantic-metrics with Apache License 2.0 | 5 votes |
private void reportMetered(MetricId key, Meter value) { key = MetricId.join(prefix, key); final Metric m = FastForward .metric(key.getKey()) .attributes(key.getTags()) .attribute(METRIC_TYPE, "meter"); reportMetered(m, value); reportCounter(key, value); }
Example 5
Source File: FastForwardReporter.java From semantic-metrics with Apache License 2.0 | 5 votes |
private void reportTimer(MetricId key, Timer value) { key = MetricId.join(prefix, key); final Metric m = FastForward .metric(key.getKey()) .attributes(key.getTags()) .attribute(METRIC_TYPE, "timer") .attribute("unit", "ns"); reportMetered(m, value); reportHistogram(m, value.getSnapshot()); }
Example 6
Source File: FastForwardReporter.java From semantic-metrics with Apache License 2.0 | 5 votes |
private void reportDerivingMeter(MetricId key, DerivingMeter value) { key = MetricId.join(prefix, key); final Metric m = FastForward .metric(key.getKey()) .attributes(key.getTags()) .attribute(METRIC_TYPE, "deriving-meter"); reportMetered(m, value); }