backstage / backstage/community-plugins

New Relic Plugins: Support for Multiple Dashboards, APM Apps, and Multi-Account Configurations

Open
#7,435 3 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted workspace/newrelic
Dominant language
TypeScript
Stars
422
Forks
697
Avg merge
2d 6h
Merged PRs (30d)
286

Description

### Workspace

newrelic

### 🔖 Feature description

The New Relic Dashboard and APM plugins currently only support a single dashboard GUID and single application ID per entity:

**Current limitation:**
- `newrelic.com/dashboard-guid`: accepts only one GUID
- `newrelic.com/application-id`: accepts only one application ID
- Proxy supports only one New Relic account/API key

**Requested features:**
1. Support for multiple dashboard GUIDs per entity (comma-separated or array format)
2. Support for multiple APM application IDs
3. Multi-account support for different environments (dev/staging/production)

**Affected plugins:**
- @backstage-community/plugin-newrelic-dashboard
- @backstage-community/plugin-newrelic

### 🎤 Context

**Why this is needed:**

Modern microservices typically have:
- Multiple dashboards tracking different aspects (infrastructure, business metrics, security, compliance)
- Separate New Relic accounts per environment for isolation, security, and billing
- Multiple application instances across regions/clusters

**Real-world example:**
A service `my-api` has:
- Dev account dashboard: `guid-dev-123`
- Staging account dashboard: `guid-staging-456`
- Production account dashboard: `guid-prod-789`

Currently impossible to view all three in Backstage without creating three separate entities.

### ✌️ Possible Implementation

**Option 1: Comma-separated values**
```
annotations:
newrelic.com/dashboard-guid: 'guid1,guid2,guid3'
newrelic.com/application-id: 'id1,id2,id3'
```

**Option 2: Array format**
```
annotations:
newrelic.com/dashboard-guids:
- 'guid1'
- 'guid2'
```
Option 3: Environment-specific annotations (for multi-account)
```
annotations:
newrelic.com/dashboard-guid.dev: 'dev-guid'
newrelic.com/dashboard-guid.staging: 'staging-guid'
newrelic.com/dashboard-guid.production: 'prod-guid'
```

**Code changes needed:**

- Update getDashboardEntity() to parse and accept array of GUIDs
- Add UI component with tabs/accordion for multiple dashboards
- Support multiple proxy endpoints for different accounts
- Update isNewRelicDashboardAvailable to check any valid annotation

**Technical investigation:**
I inspected the plugin source at node_modules/@backstage-community/plugin-newrelic-dashboard/dist/components/NewRelicDashboard/DashboardEntityList.esm.js and confirmed getDashboardEntity() accepts only a single string value with no array parsing logic.

### 👀 Have you spent some time to check if this feature request has been raised before?

- [x] I checked and didn't find similar issue

### 🏢 Have you read the Code of Conduct?

- [x] I have read the [Code of Conduct](https://github.com/backstage/community-plugins/blob/main/CODE_OF_CONDUCT.md)

### Are you willing to submit PR?

None

Contributor guide

Open the contributing guide

Research direction

Start with the mentioned DashboardEntityList.esm.js entry point and inspect getDashboardEntity() and isNewRelicDashboardAvailable(). Trace how dashboard and application annotations reach the plugin UI and proxy configuration. Done means supporting multiple dashboards and APM applications plus environment-specific accounts, with the requested entities rendered and available when any valid annotation is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.