> For the complete documentation index, see [llms.txt](https://docs.pagerly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagerly.io/sre-ai-agent/data-sources/newrelic.md).

# New Relic

## What the Agent Can Do

* Query APM data — response times, error rates, throughput
* Search logs and infrastructure metrics
* Run NRQL queries for custom analysis

## Setup Instructions

1. Log into your **New Relic account**
2. Click your name (bottom-left) > **API Keys**
3. Click **Create a key**, select **User** key type
4. Give it a name (e.g., `Pagerly`) and click **Create**
5. Copy the API key and your Account ID (found in **Administration** > **Access management**)

## Required Credentials

| Field            | Description               | Example    |
| ---------------- | ------------------------- | ---------- |
| **User API Key** | New Relic User API key    | `NRAK-...` |
| **Account ID**   | Your New Relic account ID | `1234567`  |

## Context Prompt Tips

> *"Our main app is called api-gateway in New Relic. Production transactions use appName=api-gateway-prod. Key metrics are response time and error rate."*

## Docs

* [New Relic API Keys](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/)
