A developer must use AWS X-Ray to monitor an application that is running on an Amazon EC2 instance. The developer has prepared the application by using the X-Ray SDK. What should the developer do to perform the monitoring?
A.
Configure the X-Ray SDK sampling rule and target. Activate the X-Ray daemon from the EC2 console or the AWS CLI with the modify-instance-attribute command to set the XRayEnabled flag.
B.
Install the X-Ray daemon. Assign an IAM role to the EC2 instance with a policy that allows writes to X-Ray.
C.
Install the X-Ray daemon. Configure it to forward data to Amazon EventBridge (Amazon CloudWatch Events). Grant the EC2 instance permission to write to Event Bridge (CloudWatch Events).
D.
Deploy the X-Ray SDK with the application, and instrument the application code. Use the SDK logger to capture and send the events.
B) Correct
To monitor an application with AWS X-Ray on an Amazon EC2 instance, you need two key components:
The X-Ray SDK: This is already integrated into the application, as mentioned in the question.
The X-Ray daemon: This is a process that runs alongside the application and collects trace data sent by the SDK, then sends it to the X-Ray service.
The daemon needs permissions to send trace data to X-Ray. This is achieved by attaching an IAM role with the AWSXrayWriteOnlyAccess policy to the EC2 instance.
this is from tutorial dojo Compute platform How to enable X-Ray daemon
EC2/on-premises -Download and install X-Ray daemon
Lambda Function- Enable the Active Tracing option
Elastic Beanstalk- Enable the X-Ray Daemon option
Amazon ECS-Use a Docker image that has X-Ray daemon
In order to run an application on EC2 that sends information to X-Ray, we need first to install the daemon on the instance and then configure the instance's instance profile role assigning the rights to send tracing data to XRay. So, B is the correct answer
To monitor an application running on an Amazon EC2 instance using AWS X-Ray, the following steps must be performed:
1. Install the X-Ray daemon on the EC2 instance.
2. Assign an IAM role to the EC2 instance that has a policy that allows writes to X-Ray. This will allow the X-Ray daemon to send tracing data to X-Ray.
3. Prepare the application by using the X-Ray SDK and instrumenting the application code.
Once these steps are completed, X-Ray will be able to collect and visualize the tracing data from the application. The X-Ray daemon will automatically collect tracing data from the application and send it to X-Ray for analysis.
Configuring the X-Ray SDK sampling rule and target is not necessary to perform the monitoring. Similarly, configuring the X-Ray daemon to forward data to Event Bridge (CloudWatch Events) is not necessary as it can directly send data to X-Ray.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
sumanshu
4 months, 2 weeks agoAsmaZoheb
1 year, 3 months agoAsmaZoheb
1 year, 3 months agorcaliandro
1 year, 10 months agomay2021_r
2 years, 2 months agoaarti_k
2 years, 2 months agowhenthan
2 years, 3 months agoalthu_1995
2 years, 3 months agoramireze
2 years, 6 months agoMillerules
2 years, 6 months agohaazybanj
2 years, 7 months agoHarry_01
2 years, 7 months agoSpamuel
2 years, 8 months agoJAMG54
2 years, 8 months ago