Skip to content

Instantly share code, notes, and snippets.

@hanhdt
Created October 16, 2018 00:14
Show Gist options
  • Save hanhdt/0413a621e1c86fbcd0584abf6c374ca4 to your computer and use it in GitHub Desktop.
Save hanhdt/0413a621e1c86fbcd0584abf6c374ca4 to your computer and use it in GitHub Desktop.
A sample AWS XRay on Elastic Beanstalk instance
commands:
01-stop-tracing:
command: yum remove -y xray
ignoreErrors: true
02-copy-tracing:
command: curl https://s3.dualstack.us-east-2.amazonaws.com/aws-xray-assets.us-east-2/xray-daemon/aws-xray-daemon-2.x.rpm -o /home/ec2-user/xray.rpm
03-start-tracing:
command: yum install -y /home/ec2-user/xray.rpm
files:
"/opt/elasticbeanstalk/tasks/taillogs.d/xray-daemon.conf" :
mode: "000644"
owner: root
group: root
content: |
/var/log/xray/xray.log
"/etc/amazon/xray/cfg.yaml" :
mode: "000644"
owner: root
group: root
content: |
Socket:
UDPAddress: "127.0.0.1:2000"
Region: "us-west-2"
LocalMode: true
Logging:
LogLevel: "debug"
LogPath: "/var/log/xray/xray.log"
Version: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment