Knowledgebase

X-Ray doesn't collect requests

If AWS X-Ray is not collecting requests as expected, there could be several reasons for this. Here are some steps you can take to troubleshoot the issue:

  1. Check Instrumentation:

    • Ensure that your application is correctly instrumented with the AWS X-Ray SDK. The SDK should be integrated into your code to capture and send trace data.
  2. Verify IAM Permissions:

    • Make sure that the IAM role associated with your EC2 instances or Lambda functions has the necessary permissions to send trace data to X-Ray. The role should have the AWSXRayDaemonWriteAccess policy attached.
  3. Check Daemon Configuration:

    • If you're using the X-Ray daemon (xray-daemon), ensure that it's running and properly configured on your server. The daemon is responsible for sending trace data to the X-Ray service.
  4. Check Sampling Rules:

    • Review the sampling rules in the X-ray console. If the sampling rate is set too low, it might exclude some requests from being captured.
  5. Review Filter Expressions:

    • In the X-Ray console, check if any filter expressions are applied. These can limit the traces that are displayed.
  6. Check Service Instrumentation:

    • Make sure that all the services involved in a request (e.g., EC2 instances, Lambda functions, databases) are correctly instrumented with the X-Ray SDK.
  7. Verify Trace Header Propagation:

    • Ensure that the X-Ray trace header is being propagated between services. This header is crucial for correlating traces across different components of your application.
  8. Network Issues:

    • Check for any network issues that might be preventing your application from communicating with the X-Ray service. Ensure that the necessary ports (UDP port 2000 and TCP port 2000) are open.
  9. Check for Errors in Logs:

    • Review the logs generated by your application for any errors related to X-ray instrumentation or trace submission.
  10. Confirm AWS Region:

    • Make sure that your AWS resources (e.g., EC2 instances, Lambda functions) and the X-Ray service are in the same AWS region.
  11. Verify Active Traces:

    • In the X-Ray console, check the "Active Traces" metric to see if there are any traces being recorded.
  12. AWS X-Ray Console:

    • Visit the AWS X-Ray console and navigate to the specific service map or trace view to see if any data is being recorded.

If you've gone through these steps and are still experiencing issues, consider reaching out to AWS Support for further assistance. They can provide detailed guidance and help troubleshoot any specific issues you might be facing with X-ray instrumentation.

  • 0 Users Found This Useful
Was this answer helpful?