stats_metric_event(struct metric *metric, struct event *event, pool_t pool)
{
/* duration is special - we always add it */
- stats_metric_event_field(event, "duration",
+ stats_metric_event_field(event, STATS_EVENT_FIELD_NAME_DURATION,
metric->duration_stats);
for (unsigned int i = 0; i < metric->fields_count; i++)
below. This is necessary to allow group-by functions to quantize
based on the event duration. */
event_get_last_duration(event, &duration);
- event_add_int(event, "duration", duration);
+ event_add_int(event, STATS_EVENT_FIELD_NAME_DURATION, duration);
/* process stats */
iter = event_filter_match_iter_init(metrics->stats_filter, event, ctx);