docs: update plugin installation docs

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-04-15 20:12:33 +02:00
parent 610619dba0
commit c614ede9a5
25 changed files with 152 additions and 283 deletions
+12 -20
View File
@@ -12,33 +12,25 @@ Website: [https://rollbar.com/](https://rollbar.com/)
yarn add @backstage/plugin-rollbar
```
3. Add plugin to the list of plugins:
3. Add to the app `EntityPage` component:
```ts
// packages/app/src/plugins.ts
export { plugin as Rollbar } from '@backstage/plugin-rollbar';
```
4. Add to the app `EntityPage` component:
```ts
```tsx
// packages/app/src/components/catalog/EntityPage.tsx
import { Router as RollbarRouter } from '@backstage/plugin-rollbar';
import { EntityRollbarContent } from '@backstage/plugin-rollbar';
// ...
const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
const serviceEntityPage = (
<EntityPageLayout>
// ...
<EntityPageLayout.Content
path="/rollbar"
title="Errors"
element={<RollbarRouter entity={entity} />}
/>
...
<EntityLayout.Route path="/rollbar" title="Rollbar">
<EntityRollbarContent />
</EntityLayout.Route>
...
</EntityPageLayout>
);
```
5. Setup the `app.config.yaml` and account token environment variable
4. Setup the `app.config.yaml` and account token environment variable
```yaml
# app.config.yaml
@@ -48,7 +40,7 @@ rollbar:
accountToken: ${ROLLBAR_ACCOUNT_TOKEN}
```
6. Annotate entities with the rollbar project slug
5. Annotate entities with the rollbar project slug
```yaml
# pump-station-catalog-component.yaml
@@ -60,7 +52,7 @@ metadata:
rollbar.com/project-slug: project-name
```
7. Run app with `yarn start` and navigate to `/rollbar` or a catalog entity
6. Run app with `yarn start` and navigate to `/rollbar` or a catalog entity
## Features