Skip to content

LongTaskTimer#measure does not return max duration #6421

@cascheberg

Description

@cascheberg

Describe the bug
LongTaskTimer#measure does not return the maximum duration, see current code:

@Override
default Iterable<Measurement> measure() {
return Arrays.asList(new Measurement(() -> (double) activeTasks(), Statistic.ACTIVE_TASKS),
new Measurement(() -> duration(baseTimeUnit()), Statistic.DURATION));
}

The following is missing:
new Measurement(() -> max(baseTimeUnit()), Statistic.MAX)

Environment

  • Micrometer version: current main branch

Expected behavior
https://docs.micrometer.io/micrometer/reference/concepts/long-task-timers.html:

Long task timers publish at least the following statistics:

  • Active task count
  • Total duration of active tasks
  • The maximum duration of active tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA general bugmodule: micrometer-coreAn issue that is related to our core module

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions