Skip to content

Request: Add StartedBy field to ECS Task Metadata

0

As described in the Task API, startedBy tag is useful for us to keep basic metadata about the task.

We'd like it to be included in the ECS Task Metadata in order to be able to receive it in tools like OpenTelemetry.

asked 9 months ago108 views
1 Answer
0

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:

  1. Making additional API calls to retrieve the startedBy information.
  2. Incorporating the startedBy value into a custom label or tag that is included in the task definition, which would then be visible in the task metadata.
  3. 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

answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.