Skip to content

Commit e46b149

Browse files
committed
Update docs on how task_name is set for a task app
1 parent 27c6f9f commit e46b149

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

docs/src/main/asciidoc/appendix-task-repository-schema.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Spring Cloud Task Framework at app startup establishes the next available id as
2424

2525
|END_TIME |FALSE | DATETIME | X | Spring Cloud Task Framework at app exit establishes the value.
2626

27-
|TASK_NAME |FALSE | VARCHAR | 100 | Spring Cloud Task Framework at app startup will set this to "Application" unless user establish the name using the spring.cloud.task.name as discussed <<features-task-name,here>>
27+
|TASK_NAME |FALSE | VARCHAR | 100 | Spring Cloud Task Framework at app startup will set this to "Application" unless user establish the name using the `spring.application.name`.
2828

2929
|EXIT_CODE |FALSE | INTEGER | X | Follows Spring Boot defaults unless overridden by the user as discussed https://docs.spring.io/spring-cloud-task/docs/current/reference/#features-lifecycle-exit-codes[here].
3030

docs/src/main/asciidoc/features.adoc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -243,23 +243,6 @@ may be required.
243243
NOTE: Users should not directly use getter methods from a `TaskConfigurer` directly
244244
unless they are using it to supply implementations to be exposed as Spring Beans.
245245

246-
[[features-task-name]]
247-
=== Task Name
248-
249-
In most cases, the name of the task is the application name as configured in Spring
250-
Boot. However, there are some cases where you may want to map the run of a task to a
251-
different name. Spring Cloud Data Flow is an example of this (because you probably want
252-
the task to be run with the name of the task definition). Because of this, we offer the
253-
ability to customize how the task is named, through the `TaskNameResolver` interface.
254-
255-
By default, Spring Cloud Task provides the `SimpleTaskNameResolver`, which uses the
256-
following options (in order of precedence):
257-
258-
. A Spring Boot property (configured in any of the ways Spring Boot allows) called
259-
`spring.cloud.task.name`.
260-
. The application name as resolved using Spring Boot's rules (obtained through
261-
`ApplicationContext#getId`).
262-
263246
[[features-task-execution-listener]]
264247
=== Task Execution Listener
265248

@@ -422,7 +405,6 @@ Spring Cloud Task captures the following metrics with the following fields:
422405
** task.exit.code - The exit code of the application.
423406
** service - Service name assigned by the `management.metrics.tags.service` property.
424407
** task.execution.id - The execution id associated with the task execution.
425-
** task.name - The name associated with the task execution via the `spring.cloud.task.name` property.
426408
** task.parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
427409
** count - as recorded by the timer.
428410
** total_time - as recorded by the timer.
@@ -439,7 +421,6 @@ Spring Cloud Task establishes the following Observation with the following field
439421
** error - Exception that was thrown during `ApplicationRunner` or `CommandLineRunner` execution.
440422
** spring.cloud.task.runner.bean-name - The name of the bean for the `ApplicationRunner` or `CommandLineRunner`
441423
** task.execution.id - The execution id associated with the task execution.
442-
** task.name - The name associated with the task execution via the `spring.cloud.task.name` property.
443424
** task.parent.execution.id - The parent execution id associated with the task execution via the `spring.cloud.task.parent-execution-id` proeprty.
444425
** count - as recorded by the Observation.
445426
** total_time - as recorded by the Observation.

0 commit comments

Comments
 (0)