Deprecate packages

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-04-18 20:48:51 +02:00
parent e5ed00de48
commit c9faa0bf42
5 changed files with 18 additions and 186 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-newrelic': patch
'@backstage/plugin-newrelic-dashboard': patch
---
These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository.
+2 -78
View File
@@ -1,79 +1,3 @@
# New Relic Dashboard Plugin
# Deprecated
Welcome to the newrelic-dashboard plugin!
## Features
- Adds New Relic Dashboard Pages Links to Overview section of the catalog
- Shows Snapshots of dashboards in New Relic
## Getting started
This plugin uses the Backstage proxy to securely communicate with New Relic's APIs. We use NerdGraph (New Relic's GraphQL API)
To generate a New Relic API Key , you can visit this [link](https://one.newrelic.com/launcher/api-keys-ui.api-keys-launcher)
1. Add the following to your app-config.yaml to enable this configuration:
```
// app-config.yaml
proxy:
'/newrelic/api':
target: https://api.newrelic.com
headers:
X-Api-Key: ${NEW_RELIC_USER_KEY}
```
2. Add the following to `EntityPage.tsx` to display New Relic Dashboard Tab
```
// In packages/app/src/components/catalog/EntityPage.tsx
import {
isNewRelicDashboardAvailable,
EntityNewRelicDashboardContent,
EntityNewRelicDashboardCard,
} from '@backstage/plugin-newrelic-dashboard';
const serviceEntityPage = (
<EntityLayout>
{/* other tabs... */}
<EntityLayout.Route
if={isNewRelicDashboardAvailable}
path="/newrelic-dashboard"
title="New Relic Dashboard"
>
<EntityNewRelicDashboardContent />
</EntityLayout.Route>
```
3. Add the following in `EntityPage.tsx` to display dashboard links in overview page
```
const overviewContent = (
{/* other tabs... */}
<EntitySwitch>
<EntitySwitch.Case if={isNewRelicDashboardAvailable}>
<Grid item md={6} xs={12}>
<EntityNewRelicDashboardCard />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
```
4. Add `newrelic.com/dashboard-guid` annotation in catalog descriptor file
To Obtain the dashboard's GUID: Click the info icon by the dashboard's name to access the See metadata and manage tags modal and see the dashboard's GUID.
```
// catalog-info.yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
# ...
annotations:
newrelic.com/dashboard-guid: <dashboard_guid>
spec:
type: service
```
All set , you will be able to see the plugin in action!
This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-newrelic-dashboard` instead.
+4 -2
View File
@@ -2,7 +2,8 @@
"name": "@backstage/plugin-newrelic-dashboard",
"version": "0.3.9",
"backstage": {
"role": "frontend-plugin"
"role": "frontend-plugin",
"moved": "@backstage-community/plugin-newrelic-dashboard"
},
"publishConfig": {
"access": "public",
@@ -52,5 +53,6 @@
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
}
},
"deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-newrelic-dashboard instead."
}
+2 -104
View File
@@ -1,105 +1,3 @@
# New Relic Plugin (Alpha)
# Deprecated
Website: [https://newrelic.com](https://newrelic.com)
<img src="./src/assets/img/newrelic-plugin-apm.png" alt="New Relic Plugin APM" />
<img src="./src/assets/img/newrelic-plugin-tools.png" alt="New Relic Plugin Tools" />
## Getting Started
This plugin uses the Backstage proxy to securely communicate with New Relic's
APIs.
1. Add the following to your `app-config.yaml` to enable this configuration:
```yaml
proxy:
'/newrelic/apm/api':
target: https://api.newrelic.com/v2
headers:
X-Api-Key: ${NEW_RELIC_REST_API_KEY}
allowedHeaders:
- link
```
There is some types of api key on new relic, to this use must be `User` type of key, In your production deployment of Backstage, you would also need to ensure that
you've set the `NEW_RELIC_REST_API_KEY` environment variable before starting
the backend.
While working locally, you may wish to hard-code your API key in your
`app-config.local.yaml` like this:
```yaml
# app-config.local.yaml
proxy:
'/newrelic/apm/api':
headers:
X-Api-Key: NRRA-YourActualApiKey
allowedHeaders:
- link
```
Read more about how to find or generate this key in
[New Relic's Documentation](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#rest-api-key).
See if it's working by visiting the New Relic Plugin Path:
[/newrelic](http://localhost:3000/newrelic)
2. Add a dependency to your `packages/app/package.json`:
```sh
# From your Backstage root directory
yarn --cwd packages/app add @backstage/plugin-newrelic
```
3. Add the `NewRelicPage` to your `packages/app/src/App.tsx`:
```tsx
<FlatRoutes>
<Route path="/newrelic" element={<NewRelicPage />} />
</FlatRoutes>
```
4. Add link to New Relic to your sidebar
```typescript
// packages/app/src/components/Root/Root.tsx
import ExtensionIcon from '@material-ui/icons/ExtensionOutlined';
...
export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarPage>
<Sidebar>
...
<SidebarItem icon={ExtensionIcon} to="newrelic" text="New Relic" />
...
</Sidebar>
</SidebarPage>
);
```
5. Navigate to your.domain.com/newrelic.
At this step you must be able to see a page like that
<img src="./src/assets/img/newrelic-plugin-apm.png" alt="New Relic Plugin APM" />
## Features
- View New Relic Application Performance Monitoring (APM) data such as:
- Application Name
- Response Time (ms)
- Throughput (rpm)
- Error Rate
- Instance Count
- Apdex Score
## Limitations
- Currently only supports New Relic APM data
---
You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory.
This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-newrelic` instead.
+4 -2
View File
@@ -3,7 +3,8 @@
"version": "0.3.49",
"description": "A Backstage plugin that integrates towards New Relic",
"backstage": {
"role": "frontend-plugin"
"role": "frontend-plugin",
"moved": "@backstage-community/plugin-newrelic"
},
"publishConfig": {
"access": "public",
@@ -59,5 +60,6 @@
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
}
},
"deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-newrelic instead."
}