Updating micrometer docs
This commit is contained in:
@@ -396,42 +396,79 @@ To do so, add the process-aot execution and set `spring.cloud.task.single-step-i
|
|||||||
|
|
||||||
=== Enabling Micrometer Metrics and Observations for Spring Cloud Task
|
=== Enabling Micrometer Metrics and Observations for Spring Cloud Task
|
||||||
|
|
||||||
Spring Cloud Task captures the following metrics with the following fields:
|
==== Timer
|
||||||
|
The `spring.cloud.task` metric captures the information of a task following the execution of the task.
|
||||||
|
Spring Cloud Task captures the following information for a Timer:
|
||||||
|
|
||||||
* spring.cloud.task - Task timer measurements. Records information about task duration and status.
|
* spring.cloud.task - Task timer measurements. Records information about task duration and status.
|
||||||
** application - Name assigned by `management.metrics.tags.application` property.
|
** application - Name assigned by `management.metrics.tags.application` property.
|
||||||
** task.exception - Exception that was thrown during task execution.
|
** exit.code - The exit code of the application.
|
||||||
** task.exit.code - The exit code of the application.
|
|
||||||
** service - Service name assigned by the `management.metrics.tags.service` property.
|
** service - Service name assigned by the `management.metrics.tags.service` property.
|
||||||
** task.execution.id - The execution id associated with the task execution.
|
** execution.id - The execution id associated with the task execution.
|
||||||
** task.parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
|
** parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
|
||||||
** count - as recorded by the timer.
|
** count - as recorded by the timer.
|
||||||
** total_time - as recorded by the timer.
|
** total_time - as recorded by the timer in seconds.
|
||||||
** max_time - as recorded by the timer.*
|
** max - as recorded by the timer in seconds.
|
||||||
|
* - LongTask timer measurement. Records the run-time status of long-time lasting tasks.
|
||||||
|
|
||||||
|
==== Long Task Timer
|
||||||
|
The `spring.cloud.task.active` metric captures the information of a task during the task execution.
|
||||||
|
Spring Cloud Task captures the following information for a Long Task Timer (active):
|
||||||
|
|
||||||
|
* spring.cloud.task - Task timer measurements. Records information about task duration and status.
|
||||||
|
** application - Name assigned by `management.metrics.tags.application` property.
|
||||||
|
** exit.code - The exit code of the application.
|
||||||
|
** service - Service name assigned by the `management.metrics.tags.service` property.
|
||||||
|
** execution.id - The execution id associated with the task execution.
|
||||||
|
** parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
|
||||||
|
** active_tasks - as recorded by the long task timer.
|
||||||
|
** duration - as recorded by the long task timer.
|
||||||
* spring.cloud.task.active - LongTask timer measurement. Records the run-time status of long-time lasting tasks.
|
* spring.cloud.task.active - LongTask timer measurement. Records the run-time status of long-time lasting tasks.
|
||||||
|
|
||||||
|
|
||||||
==== Observations
|
==== Observations
|
||||||
Spring Cloud Task allows user to enable Observations for `CommandLineRunner` and `ApplicationRunner` s.
|
Spring Cloud Task allows user to enable Observations for `CommandLineRunner` and `ApplicationRunner` s.
|
||||||
|
|
||||||
|
To Enable Task Observations for `ApplicationRunner` s or `CommandLineRunner` s set `spring.cloud.task.observation.enabled` to true.
|
||||||
|
|
||||||
|
An example task application with observations enables using the `SimpleMeterRegistry` can be found https://github.com/spring-cloud/spring-cloud-task/tree/main/spring-cloud-task-samples/task-metrics[here].
|
||||||
|
|
||||||
|
===== Runner Timer
|
||||||
|
The `spring.cloud.task.runner` metric captures the information of a task application/commandline runner following the execution of the application/commandline runner.
|
||||||
|
Spring Cloud Task captures the following information for a runner's Timer:
|
||||||
|
|
||||||
Spring Cloud Task establishes the following Observation with the following fields:
|
Spring Cloud Task establishes the following Observation with the following fields:
|
||||||
|
|
||||||
* spring.cloud.task.runner - Observed representation of a `CommandLineRunner` or `ApplicationRunner`.
|
* spring.cloud.task.runner - Observed representation of a `CommandLineRunner` or `ApplicationRunner`.
|
||||||
** application - Name assigned by `management.metrics.tags.application` property.
|
** application - Name assigned by `management.metrics.tags.application` property.
|
||||||
** error - Exception that was thrown during `ApplicationRunner` or `CommandLineRunner` execution.
|
** error - Exception that was thrown during `ApplicationRunner` or `CommandLineRunner` execution.
|
||||||
** spring.cloud.task.runner.bean-name - The name of the bean for the `ApplicationRunner` or `CommandLineRunner`
|
** spring.cloud.task.runner.bean-name - The name of the bean for the `ApplicationRunner` or `CommandLineRunner`
|
||||||
** task.execution.id - The execution id associated with the task execution.
|
** execution.id - The execution id associated with the task execution.
|
||||||
** task.parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
|
** parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
|
||||||
** count - as recorded by the Observation.
|
** count - as recorded by the Observation.
|
||||||
** total_time - as recorded by the Observation.
|
** total_time - as recorded by the Observation.
|
||||||
** max_time - as recorded by the Observation.
|
** max - as recorded by the Observation.
|
||||||
|
|
||||||
To Enable Task Observations for `ApplicationRunner` s or `CommandLineRunner` s set `spring.cloud.task.observation.enabled` to true.
|
===== Long Task Runner Timer
|
||||||
|
The `spring.cloud.task.runner.active` metric captures the information of a task application/commandline runner during the execution of the application/commandline runner.
|
||||||
|
Spring Cloud Task captures the following information for a runner's Long Task Timer:
|
||||||
|
|
||||||
|
Spring Cloud Task establishes the following Observation with the following fields:
|
||||||
|
|
||||||
|
* spring.cloud.task.runner - Observed representation of a `CommandLineRunner` or `ApplicationRunner`.
|
||||||
|
** application - Name assigned by `management.metrics.tags.application` property.
|
||||||
|
** error - Exception that was thrown during `ApplicationRunner` or `CommandLineRunner` execution.
|
||||||
|
** spring.cloud.task.runner.bean-name - The name of the bean for the `ApplicationRunner` or `CommandLineRunner`
|
||||||
|
** execution.id - The execution id associated with the task execution.
|
||||||
|
** parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
|
||||||
|
** count - as recorded by the Observation.
|
||||||
|
** total_time - as recorded by the Observation.
|
||||||
|
** max - as recorded by the Observation.
|
||||||
|
|
||||||
An example task application with observations enables using the `SimpleMeterRegistry` can be found https://github.com/spring-cloud/spring-cloud-task/tree/main/spring-cloud-task-samples/task-metrics[here].
|
|
||||||
|
|
||||||
=== Disabling Spring Cloud Task Auto Configuration
|
=== Disabling Spring Cloud Task Auto Configuration
|
||||||
|
|
||||||
In cases where Spring Cloud Task should not be auto configured for an implementation, you can disable Task's auto configuration.
|
In cases where Spring Cloud Task should not be autoconfigured for an implementation, you can disable Task's auto configuration.
|
||||||
This can be done either by adding the following annotation to your Task application:
|
This can be done either by adding the following annotation to your Task application:
|
||||||
```
|
```
|
||||||
@EnableAutoConfiguration(exclude={SimpleTaskAutoConfiguration.class})
|
@EnableAutoConfiguration(exclude={SimpleTaskAutoConfiguration.class})
|
||||||
|
|||||||
Reference in New Issue
Block a user