aws / aws-xray-daemon

The AWS X-Ray daemon listens for traffic on UDP port 2000, gathers raw segment data, and relays it to the AWS X-Ray API.
Apache License 2.0
189 stars 69 forks source link

Cannot change port #189

Open moritonal opened 1 year ago

moritonal commented 1 year ago

Hi

Looking to use this as a side-car in an ECS setup and might just be missing something so feel free to refute.

The port here is hard-coded to 2000, and my Rails app is set to port 2000 as well. Normally a simple fix is to map the container port to a different host port, but in CDK ECS I cannot set thehostPort to anything different than containerPort.

I'll put together a PR that swaps it over to using environment vars, but I also might just be missing something obvious.

All the best

Tom

moritonal commented 1 year ago

Ah, xray uses the scratch image, which means without a shell there's no expansion making this a bit harder.

willarmiros commented 1 year ago

Hi @moritonal - is the --bind arg not sufficient for what you're looking for? https://github.com/aws/aws-xray-daemon#daemon-usage-command-line-args