- Newest
- Most votes
- Most comments
I apologize, but there seems to be a misunderstanding in your request. The startedBy field is not currently included in the ECS Task Metadata endpoint response.
The startedBy parameter is indeed a useful tag that can be specified when starting a task, as you mentioned. It allows you to apply a unique identifier to a task, which can be helpful for tracking and filtering tasks. This parameter is available when using the StartTask or RunTask API operations.
However, the ECS Task Metadata endpoint (both v3 and v4) does not currently include the startedBy field in its JSON response. The metadata endpoint provides information about the task and its associated containers, including details such as the cluster, task ARN, container IDs, and various timestamps, but it does not include the startedBy tag.
If you need to access the startedBy information for a task, you would need to retrieve it through other ECS API calls, such as DescribeTasks, rather than through the task metadata endpoint.
To get this information included in tools like OpenTelemetry, you might need to consider alternative approaches, such as:
- Making additional API calls to retrieve the
startedByinformation. - Incorporating the
startedByvalue into a custom label or tag that is included in the task definition, which would then be visible in the task metadata. - Requesting a feature enhancement from AWS to include this field in future versions of the task metadata endpoint.
If this information is crucial for your use case, you may want to consider submitting a feature request to AWS to include the startedBy field in future versions of the ECS Task Metadata endpoint.
Sources
Task - Amazon Elastic Container Service
Amazon ECS task metadata V4 JSON response - Amazon Elastic Container Service
StartTask - Amazon Elastic Container Service
RunTask - Amazon Elastic Container Service
Amazon ECS task metadata v3 JSON response - Amazon Elastic Container Service
Relevant content
- asked 3 years ago
- asked a year ago
- asked 7 months ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
