Add Micrometer support for Task applications

- New dependencies
   - micrometer-core
   - java-cfenv - required by the CF tags configuration.
 - Add TaskMetrics configuration that installs two Meters (Timer and LongTaskTimer) that produce the following time-series:
   - spring.cloud.task - shows task duration (updated only after the task has completed).
   - spring.cloud.task.active - provides run time information about the non-completed tasks.
   Both meters are started at TaskExecutionListener#onTaskStartup() and ended at onTaskEnd() or onTaskFailure().
 - Add common Task tags assigned to all time-series produced by the Task (not only the s.c.task and s.c.task.active). This allows to analyze CPU, Memory and other measurements grouped by task/execution ids.
 - Add Cloud Found tags - Activated only for CF target platform.

 Resolves #608
This commit is contained in:
Christian Tzolov
2019-06-26 10:59:35 +02:00
committed by Michael Minella
parent aa29153656
commit d4b51a074b
14 changed files with 959 additions and 2 deletions

View File

@@ -106,6 +106,15 @@
<artifactId>spring-boot-autoconfigure-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>io.pivotal.cfenv</groupId>
<artifactId>java-cfenv-test-support</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>