aws / aws/containers-roadmap

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

Open
#1,995 1 comment 6 reactions 0 assignees View on GitHub
Fargate Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

**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.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are identified in the issue. Start by reviewing the repository's existing Batch and Fargate issue context and confirming the AWS-supported X-Ray integration constraints. Done means an agreed, implementable path for enabling X-Ray tracing in Batch Fargate.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.