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.22k stars 321 forks source link

[Batch Fargate] [Feature]: Support for XRAY on Batch Fargate #1995

Open christoferson opened 1 year ago

christoferson commented 1 year ago

Community Note

Tell us about your request Running workloads using AWS Batch with Fargate compute does not support Xray. Please add support for Xray / tracing in Batch Fargate. Ideally we want an Active Tracing configuration support similar to Lambda where you can just enable without a lot of configuration.

Which service(s) is this request for? Batch with Fargate Compute Environment

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? I am currently trying to enable and send Xray traces for a Batch workload running on Fargate compute but to no avail. For ECS Fargate, we currently have the option to run the Xray daemon as a sidecar container since the TaskDefinition supports specifying multiple containers.

AWS::ECS::TaskDefinition 
  You can have multiple definitions where you can specify multiple images (1 for app and 1 for xray daemon sidecar)

However for Batch, we can only specify a single container in the JobDefinition which eliminates the sidecar option. Note also that even if we can define a sidecar, there are no properties to define the port mapping for the xray daemon.

AWS::Batch::JobDefinition  
  You can only define one ContainerProperties, hence you can only specify 1 Image. 
  We also don't have attributes to define port mappings unlike the TaskDefinition to enable UDP 2000.

It would be good to have support for xray to collect performance metrics for the various sub routines within the main tasks by sending subsegment traces.

Are you currently working around this issue? Currently, I am using Cloudwatch to gather metrics instead. However Xray will have better integration in case I have upstream and downstream services e.g. I call lambda functions from my workload.

Additional context Most of the available information regarding Fargate and Xray are pointing to using the sidecar pattern so I was unable to find a solution for AWS Batch. Kindly let me know in case I have missed a good resource or article.

Attachments None. Let me know in case one is needed.

luxaritas commented 10 months ago

1522 seems related