# New Relic

New Relic is a cloud-based observability platform that offers real-time monitoring and optimization of applications and infrastructure with advanced visualizations. This guide explains how to integrate ThousandEyes metrics with New Relic using OpenTelemetry.

For more information about sending metrics to New Relic using OpenTelemetry, see [New Relic: Troubleshoot your applications faster with OpenTelemetry and New Relic](https://newrelic.com/blog/how-to-relic/opentelemetry-user-experience).

## Step 1: Generate API Key

To send data to New Relic, you need an ingestion token. Follow these steps to create a New Relic API key.

1. In the New Relic Cloud platform, go to **API keys**.
2. Click **Create a key**.
3. Select an **Account**.
4. Select **Ingest - License as your Key type**.
5. Enter a **Name**.
6. Click **Create a key** to create your API Key.
7. **Copy the key ID** to use it to send telemetry data to New Relic.

## Step 2: Create an Integration

### Create an Integration Using the ThousandEyes UI

1. Log in to your account on the ThousandEyes platform.
2. Navigate to **Integrations > Integration 1.0** from the side menu.
3. Click **New Integration** and select **OpenTelemetry Integration**.
4. Enter a **Name** for the integration.
5. Set the **Target** to **GRPC**. New Relic supports both **HTTP** and **GRPC**.
6. Enter the **Endpoint URL**.
7. For **Preset Configurations**, select **New Relic**.
8. For **Auth Type**, select **Custom**.
9. Add the following **Custom Header**:
   * **api-key**: Enter your **API Key ID** from [step 1](#step-1-generate-api-key).
10. For the OpenTelemetry **Signal**, select **Metric**.
11. For the **Data Model Version**, select **v2**.
12. Select a **test**. For more information on creating a test, see [General Setup Instructions](https://docs.thousandeyes.com/product-documentation/integration-guides/opentelemetry/observability-platforms#general-setup-instructions).
13. Click **Save** to complete the integration setup.

You have now successfully integrated your ThousandEyes data with New Relic.

### Manage Integrations in the UI

For more information on managing OpenTelemetry integrations, including listing, editing, and deleting integrations, see [Manage Integrations Using the UI - Integrations 1.0](https://docs.thousandeyes.com/product-documentation/integration-guides/opentelemetry/manage-integrations#manage-integrations-using-the-ui-integrations-1.0).

### Create an Integration Using the ThousandEyes API

For a programmatic integration, use the following API command:

#### Using HTTP Protocol

```curl
curl -v -XPOST https://api.thousandeyes.com/v7/stream -H "Content-Type: application/json" -H \
"Authorization: Bearer $BEARER_TOKEN" -d '{
  "type": "opentelemetry",
  "testMatch": [{
    "id": "281474976717575",
    "domain": "cea"
  }],
  "endpointType": "http",
  "streamEndpointUrl": "https://otlp.eu01.nr-data.net:4318/v1/metrics",
  "customHeaders": {
    "api-key": "{NEW_RELIC_LICENSE_KEY}"
  }
}'
```

#### Using gRPC Protocol

```curl
curl -v -XPOST https://api.thousandeyes.com/v7/stream -H "Content-Type: application/json" -H \
"Authorization: Bearer $BEARER_TOKEN" -d '{
  "type": "opentelemetry",
  "testMatch": [{
    "id": "281474976717575",
    "domain": "cea"
  }],
  "endpointType": "grpc",
  "streamEndpointUrl": "https://otlp.eu01.nr-data.net:4317",
  "customHeaders": {
    "api-key": "{NEW_RELIC_LICENSE_KEY}"
  }
}'
```

Replace `{NEW_RELIC_LICENSE_KEY}` with the correct values for your instance.

## ThousandEyes Dashboard in New Relic

![ThousandEyes Dashboard in New Relic](https://1112912342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4QARF6s57qxMrOHDTZ%2Fuploads%2Fgit-blob-c1b5b27296b4cc22a15eba380f28535437a9ff1e%2Fnew-relic-thousandeyes-dashboard.png?alt=media)

You can download the dashboard template from the following link: [Download ThousandEyes New Relic dashboard template](https://github.com/thousandeyes/thousandeyes-observability-dashboards/blob/main/newRelic/ThousandEyesDashboard.json).


---

# 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.thousandeyes.com/product-documentation/integration-guides/opentelemetry/observability-platforms/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.
