# New Relic

### Overview

The new Luciq integration with New Relic enables end-to-end tracing for network calls, connecting client-side and server-side monitoring for your network requests. By using a unique trace ID, you can follow any network request from the client to the server, providing insights for troubleshooting networking issues.

<figure><img src="/files/ef5EXr1JKfCcWP2ZvPjT" alt=""><figcaption></figcaption></figure>

### Prerequisites

#### New Relic

To use this integration, ensure the following prerequisites are met in your New Relic setup:

* **Distributed Tracing in Your Plan**: Ensure that your New Relic plan includes distributed tracing.
* **New Agent Supporting W3C Context Propagation**: You need to use a New Relic agent that supports W3C context propagation. More details can be found [here](https://newrelic.com/blog/nerdlog/w3c-trace-context-distributed-tracing-standard).
* **Enable Distributed Tracing in Backend Agent**: Distributed tracing must be enabled in your backend agent. More information is available [here](https://docs.newrelic.com/docs/distributed-tracing/concepts/quick-start/).

{% hint style="info" %}
Note: if you use any trace sampling algorithms, New Relic may drop some traces. Consequently, you might see network requests in Luciq that are not available in New Relic.
{% endhint %}

#### Luciq

* **Supported Platforms**: This integration is only supported for iOS and Android.
* **Luciq SDK Version**: Ensure you have a minimum SDK v13.2.0 or higher on either iOS or Android.

### Integration Steps

{% hint style="info" %}
By setting up this integration, Luciq will attach a trace ID as an HTTP header to your network requests. This allows us to link network requests from Luciq to New Relic.
{% endhint %}

Go to **Settings** -> **Integrations** -> **New Relic** in your Luciq dashboard, and follow these integration steps:

{% stepper %}
{% step %}
**Set Up**

Enter your New Relic dashboard link. If you use custom domains for New Relic, replace `one.newrelic.com` with your company domain (e.g., `x.newrelic.com`). For redirecting to multiple organizations from the same app, use `one.newrelic.com`.

<figure><img src="/files/kwtG7MTt4xU8jxKh730Z" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Test**

Validate the New Relic dashboard link to ensure it is correct.

<figure><img src="/files/I3t9HADPZWQapugnxBSP" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Finish**

Ensure the APM - Network Requests checkbox is checked to trace network requests to New Relic, then give your integration a name and save the integration.
{% endstep %}
{% endstepper %}

## Using the integration

When a network occurrence is logged, a unique trace ID will appear on the occurrence page in the Luciq dashboard.

{% stepper %}
{% step %}
**Copy the Trace ID**

Navigate to any network occurrence and **copy the Trace ID**.

<figure><img src="/files/KTKfYayYDcXSdMvTzz5I" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**View on New Relic**

Click on "**View on New Relic**" to go to the traces page in New Relic.

<figure><img src="/files/qTfb2giLQytn4chKEftR" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Filter by Trace ID**

**Paste the Trace ID into the filter** in New Relic (traceid = xxxxx) to view the same trace.

<figure><img src="/files/SYwJrxcq3QykeOJsLAL1" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.luciq.ai/product-guides-and-integrations/integrations/new-relic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
