New Relic Android agents support distributed tracing. This lets you see how your mobile app activity connects to related services.
Watch this short video (approx. 2:15 minutes) to learn how to:
- Find mobile distributed tracing data in New Relic.
- Filter by standard and custom attributes.
Requirements
To use distributed tracing, you need at least Android agent version 6.0.0. We recommend you use the most recent agent.
How to set up distributed tracing
For mobile agents that support this feature, it’s enabled by default. You also need to turn on AnalyticsEvents for this feature to work.
If you prefer to turn off distributed tracing, see Android feature flag.
Enable Infinite Tracing
If your mobile apps have some downstream services that use our tail-based distributed tracing called Infinite Tracing, you should enable this feature for your mobile apps. This ensures that your root span (the initiating mobile app) is included in the rest of the spans tracked by Infinite Tracing.
To set this up, see the Infinite Tracing steps to create a trace observer and to select which mobile apps (data sources) should report spans.
Find data
Mobile spans appear in any New Relic distributed tracing UI where those spans are part of a trace.
Here are some tips for finding and querying data:
- You can find end-user-originating traces in any New Relic distributed tracing UI.
- In the distributed tracing UI, end-user spans are indicated with the icon.
- To see a span's attributes, select a span in the UI.
- Spans are reported as Span data, and can be queried in New Relic.
- Query tips:
- Query by name by setting
mobileApp.name
to the mobile app name. - Query for traces containing at least one mobile app span with
mobileApp.name is not null
. - Query for traces containing at least one backend app with
appName is not null
. - Query for traces containing both mobile and backend spans by combining the two previous conditions.
- Query by name by setting
Troubleshooting
If you don't see end-user spans, or are having other distributed tracing issues, see Troubleshooting.