aws / containers-roadmap

This is the public roadmap for AWS container services (ECS, ECR, Fargate, and EKS).
https://aws.amazon.com/about-aws/whats-new/containers/
Other
5.2k stars 316 forks source link

[ECS] [request]: Print ECS Service name in Fargate Task Metadata output #2075

Open raghugorthy opened 1 year ago

raghugorthy commented 1 year ago

Community Note

Tell us about your request Include ECS Fargate Service name in Fargate Task Metadata output. Customers trying to setup monitoring tools for their Fargate environments needs to retrieve metadata from fargate tasks, and ECS Fargate Service name is not shown as part of output this is creating additional burden to customers while trying to redirect and read the output

Which service(s) is this request for? Fargate, ECS

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? Expecting Serivce Name to be printed as part of Fargate Task Metadata output

What is the impact of not having this problem solved? While monitoring the tasks via task metadata, customer are not able to figure out to which service the tasks belong to

The more details you can provide, the better we'll be able to understand and solve the problem. Tailored output pasted below, this output doesn't show ECS Service Name.

root@ip-10-0-19-48:/app# curl ${ECS_CONTAINER_METADATA_URI_V4}/task |python -m json.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2125 0 2125 0 0 1037k 0 --:--:-- --:--:-- --:--:-- 1037k { "Cluster": "arn:aws:ecs:us-west-1:4XXXXXXXXXXX:cluster/Test", "TaskARN": "arn:aws:ecs:us-west-1:4XXXXXXXXXXX:task/Test/2e62c1b0a06d4da4b65ed0179e198dce", "Family": "fargate-case-testing", "Revision": "3", "DesiredStatus": "RUNNING", "KnownStatus": "RUNNING", "Limits": { "CPU": 0.25, "Memory": 512 }, "PullStartedAt": "2023-07-19T00:10:25.152356155Z", "PullStoppedAt": "2023-07-19T00:10:31.339393234Z", "AvailabilityZone": "us-west-1b", "Containers": [ { "DockerId": "2e62c1b0a06d4da4b65ed0179e198dce-4192749366", "Name": "amazon-linux", "DockerName": "amazon-linux", "Image": "public.ecr.aws/r6o1u3o1/fargate-web-app-public:latest", "ImageID": "sha256:f4506e95435166c6468656bc250353ab1083a95320c50cd7932dcac39511b50f", "Labels": { "com.amazonaws.ecs.cluster": "arn:aws:ecs:us-west-1:4XXXXXXXXXXX:cluster/Test", "com.amazonaws.ecs.container-name": "amazon-linux", "com.amazonaws.ecs.task-arn": "arn:aws:ecs:us-west-1:4XXXXXXXXXXX:task/Test/2e62c1b0a06d4da4b65ed0179e198dce", "com.amazonaws.ecs.task-definition-family": "fargate-case-testing", "com.amazonaws.ecs.task-definition-version": "3"

Are you currently working around this issue? How are you currently solving this problem?

No Work around available at the movement

Additional context Anything else we should know?

Attachments If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)

eliottwiener-gridunity commented 2 months ago

It would be useful for my use cases to include the service name and service ARN. I would want these to be included in $ECS_CONTAINER_METADATA_URI_V4 and $ECS_CONTAINER_METADATA_URI_V4/task.

bjrara commented 1 month ago

I'm proposing to OTEL that aws.ecs.service.name to be a supported ECS resource attributes, but even with that in place, as ECS Service is undetectable on Fargate, the attribute population will be inconsistent. As a result, metrics and traces cannot be correlated correctly with ECS Service. I'd ask ECS team to prioritize this request as it will improve the quality of observability data on ECS.