New Relic offers an integration for reporting your AWS X-Ray data. This document explains how to activate this integration and describes the data that can be reported.
Activate the integration
To enable the AWS X-Ray integration, follow standard procedures to Connect AWS services to Infrastructure.
When you've successfully connected your AWS account with New Relic:
- Go to one.newrelic.com > Infrastructure, and then click AWS.
- Click Manage Services to select the AWS integration you want to activate.
- Check the checkbox next to AWS X-Ray.
- Click Save.
Configuration and polling
You can change the polling frequency and filter your data using configuration options.
Here's the default polling information for the AWS X-Ray integration:
- New Relic polling interval: 5 minutes
Tip
Please allow up to 20 minutes for your first traces to appear. Since traces are collected after they complete, and only once per polling interval, the X-Ray trace data lags real-time considerably, and should not be used for alerting.
Important
Polling intervals longer than 5 minutes may result in lost traces. New Relic drops trace data more than 20 minutes old. Similarly, long-running traces are likely to be incomplete. New Relic's X-Ray Monitoring will collect completed traces only, and spans within a trace older than 20 minutes are dropped.
Find and use data
New Relic maps X-Ray segments into span events. Once you've activated this integration, you should see AWS X-Ray traces appearing in distributed tracing.
To filter your spans, you can use the newRelic.ingestPoint
attribute. This attribute is set to xray.polling
for all X-Ray spans.
Using custom IAM policies
If you're using a custom IAM policy when connecting your AWS account with New Relic Infrastructure, your custom policy will need the following permissions for the AWS X-Ray integration to work:
xray:BatchGet*
xray:Get*
X-Ray and Lambda Functions
Lambda functions require some configuration to use X-Ray. See the Using AWS X-Ray section in the AWS Lambda Developer Guide.
In particular, note that the execution role for your Lambda function will need additional permissions to record data to X-Ray.
X-Ray and Step Functions
AWS Step Function state machines are distributed applications, and can be monitored with X-Ray. X-Ray tracing needs to be explicitly enabled for X-Ray to capture data for step function state machines.
Be sure to enable X-Ray tracing for any lambda functions in your state machine as well as for the state machine overall.
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's and and documentation.