You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/features.adoc
+50-13Lines changed: 50 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -396,42 +396,79 @@ To do so, add the process-aot execution and set `spring.cloud.task.single-step-i
396
396
397
397
=== Enabling Micrometer Metrics and Observations for Spring Cloud Task
398
398
399
-
Spring Cloud Task captures the following metrics with the following fields:
399
+
==== Timer
400
+
The `spring.cloud.task` metric captures the information of a task following the execution of the task.
401
+
Spring Cloud Task captures the following information for a Timer:
400
402
401
403
* spring.cloud.task - Task timer measurements. Records information about task duration and status.
402
404
** application - Name assigned by `management.metrics.tags.application` property.
403
-
** task.exception - Exception that was thrown during task execution.
404
-
** task.exit.code - The exit code of the application.
405
+
** exit.code - The exit code of the application.
405
406
** service - Service name assigned by the `management.metrics.tags.service` property.
406
-
** task.execution.id - The execution id associated with the task execution.
407
-
** task.parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
407
+
** execution.id - The execution id associated with the task execution.
408
+
** parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
408
409
** count - as recorded by the timer.
409
-
** total_time - as recorded by the timer.
410
-
** max_time - as recorded by the timer.*
410
+
** total_time - as recorded by the timer in seconds.
411
+
** max - as recorded by the timer in seconds.
412
+
* - LongTask timer measurement. Records the run-time status of long-time lasting tasks.
413
+
414
+
==== Long Task Timer
415
+
The `spring.cloud.task.active` metric captures the information of a task during the task execution.
416
+
Spring Cloud Task captures the following information for a Long Task Timer (active):
417
+
418
+
* spring.cloud.task - Task timer measurements. Records information about task duration and status.
419
+
** application - Name assigned by `management.metrics.tags.application` property.
420
+
** exit.code - The exit code of the application.
421
+
** service - Service name assigned by the `management.metrics.tags.service` property.
422
+
** execution.id - The execution id associated with the task execution.
423
+
** parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
424
+
** active_tasks - as recorded by the long task timer.
425
+
** duration - as recorded by the long task timer.
411
426
* spring.cloud.task.active - LongTask timer measurement. Records the run-time status of long-time lasting tasks.
412
427
428
+
413
429
==== Observations
414
430
Spring Cloud Task allows user to enable Observations for `CommandLineRunner` and `ApplicationRunner` s.
415
431
432
+
To Enable Task Observations for `ApplicationRunner` s or `CommandLineRunner` s set `spring.cloud.task.observation.enabled` to true.
433
+
434
+
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].
435
+
436
+
===== Runner Timer
437
+
The `spring.cloud.task.runner` metric captures the information of a task application/commandline runner following the execution of the application/commandline runner.
438
+
Spring Cloud Task captures the following information for a runner's Timer:
439
+
416
440
Spring Cloud Task establishes the following Observation with the following fields:
417
441
418
442
* spring.cloud.task.runner - Observed representation of a `CommandLineRunner` or `ApplicationRunner`.
419
443
** application - Name assigned by `management.metrics.tags.application` property.
420
444
** error - Exception that was thrown during `ApplicationRunner` or `CommandLineRunner` execution.
421
445
** spring.cloud.task.runner.bean-name - The name of the bean for the `ApplicationRunner` or `CommandLineRunner`
422
-
** task.execution.id - The execution id associated with the task execution.
423
-
** task.parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
446
+
** execution.id - The execution id associated with the task execution.
447
+
** parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
424
448
** count - as recorded by the Observation.
425
449
** total_time - as recorded by the Observation.
426
-
** max_time - as recorded by the Observation.
450
+
** max - as recorded by the Observation.
427
451
428
-
To Enable Task Observations for `ApplicationRunner` s or `CommandLineRunner` s set `spring.cloud.task.observation.enabled` to true.
452
+
===== Long Task Runner Timer
453
+
The `spring.cloud.task.runner.active` metric captures the information of a task application/commandline runner during the execution of the application/commandline runner.
454
+
Spring Cloud Task captures the following information for a runner's Long Task Timer:
455
+
456
+
Spring Cloud Task establishes the following Observation with the following fields:
457
+
458
+
* spring.cloud.task.runner - Observed representation of a `CommandLineRunner` or `ApplicationRunner`.
459
+
** application - Name assigned by `management.metrics.tags.application` property.
460
+
** error - Exception that was thrown during `ApplicationRunner` or `CommandLineRunner` execution.
461
+
** spring.cloud.task.runner.bean-name - The name of the bean for the `ApplicationRunner` or `CommandLineRunner`
462
+
** execution.id - The execution id associated with the task execution.
463
+
** parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
464
+
** count - as recorded by the Observation.
465
+
** total_time - as recorded by the Observation.
466
+
** max - as recorded by the Observation.
429
467
430
-
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].
431
468
432
469
=== Disabling Spring Cloud Task Auto Configuration
433
470
434
-
In cases where Spring Cloud Task should not be auto configured for an implementation, you can disable Task's auto configuration.
471
+
In cases where Spring Cloud Task should not be autoconfigured for an implementation, you can disable Task's auto configuration.
435
472
This can be done either by adding the following annotation to your Task application:
0 commit comments