Package com.newrelic.api.agent
Interface MetricAggregator
-
public interface MetricAggregator
This aggregator allows metrics to be reported which can be viewed through custom dashboards.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
incrementCounter(java.lang.String name)
Increment the count of the metric with the given name.void
incrementCounter(java.lang.String name, int count)
Increment the count of the metric with the given name.void
recordMetric(java.lang.String name, float value)
Record a metric value for the given name.void
recordResponseTimeMetric(java.lang.String name, long millis)
Record a response time in milliseconds for the given metric name.void
recordResponseTimeMetric(java.lang.String name, long totalTime, long exclusiveTime, java.util.concurrent.TimeUnit timeUnit)
Records a metric that will not be shown in the breakdown of time for a transaction, but can be displayed in a custom dashboard.
-
-
-
Method Detail
-
recordResponseTimeMetric
void recordResponseTimeMetric(java.lang.String name, long totalTime, long exclusiveTime, java.util.concurrent.TimeUnit timeUnit)
Records a metric that will not be shown in the breakdown of time for a transaction, but can be displayed in a custom dashboard. The metric is not recorded if the name isnull
or the emptyString
.- Parameters:
name
- The name of the metric.totalTime
- The total time value for the metric. This is the value that custom dashboards will display (often the average of the value).exclusiveTime
- The exclusive time for this metric. This value is primarily used by the agent for transaction blame metrics, but it is exposed here for future uses.timeUnit
- The time unit of the values passed into this method.- Since:
- 3.9.0
-
recordMetric
void recordMetric(java.lang.String name, float value)
Record a metric value for the given name.- Parameters:
name
- The name of the metric. The metric is not recorded if the name isnull
or the emptyString
.value
- The value of the metric.- Since:
- 3.9.0
-
recordResponseTimeMetric
void recordResponseTimeMetric(java.lang.String name, long millis)
Record a response time in milliseconds for the given metric name.- Parameters:
name
- The name of the metric. The response time is not recorded if the name isnull
or the emptyString
.millis
- The response time in milliseconds.- Since:
- 3.9.0
-
incrementCounter
void incrementCounter(java.lang.String name)
Increment the count of the metric with the given name. The count will be incremented by one each time this method is called. The metric is not incremented if the name isnull
or the emptyString
.- Parameters:
name
- The name of the metric to increment.- Since:
- 3.9.0
-
incrementCounter
void incrementCounter(java.lang.String name, int count)
Increment the count of the metric with the given name. The input count value represents the amount in which the metric will be incremented. The metric is not incremented if the name isnull
or the emptyString
.- Parameters:
name
- The name of the metric to increment.count
- The amount in which the metric should be incremented.- Since:
- 3.9.0
-
-