Define a Custom Metric or Event
It can also be useful to report a value as a custom metric:
public String checkout(List<ItemOrders> orders) {
// ... Method code
double shoppingCartTotal = total(orders);
AppdynamicsAgent.getMetricPublisher().reportSumMetric("Cart Total", (long) shoppingCartTotal);
}
Server|Component:<TierName>|Custom Metrics|<MetricName>
, while publishing the metric.Reporting custom metrics and events is possible irrespective of the Business Transaction context.