docs: update plugin installation docs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
+15
-25
@@ -14,53 +14,43 @@ The Sentry Plugin displays issues from [Sentry](https://sentry.io).
|
||||
yarn add @backstage/plugin-sentry
|
||||
```
|
||||
|
||||
2. Add plugin to the app:
|
||||
|
||||
```js
|
||||
// packages/app/src/plugins.ts
|
||||
|
||||
export { plugin as Sentry } from '@backstage/plugin-sentry';
|
||||
```
|
||||
|
||||
3. Add the `SentryIssuesWidget` to the EntityPage:
|
||||
2. Add the `EntitySentryCard` to the EntityPage:
|
||||
|
||||
```jsx
|
||||
// packages/app/src/components/catalog/EntityPage.tsx
|
||||
|
||||
import { SentryIssuesWidget } from '@backstage/plugin-sentry';
|
||||
import { EntitySentryCard } from '@backstage/plugin-sentry';
|
||||
|
||||
const OverviewContent = ({ entity }: { entity: Entity }) => (
|
||||
const overviewContent = (
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
// ...
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<SentryIssuesWidget entity={entity} />
|
||||
<EntitySentryCard />
|
||||
</Grid>
|
||||
// ...
|
||||
</Grid>
|
||||
);
|
||||
```
|
||||
|
||||
> You can also import a `Router` if you want to have a dedicated sentry page:
|
||||
> You can also import the full-page `EntitySentryContent` extension if you want to have a dedicated sentry page:
|
||||
>
|
||||
> ```tsx
|
||||
> // packages/app/src/components/catalog/EntityPage.tsx
|
||||
>
|
||||
> import { Router as SentryRouter } from '@backstage/plugin-sentry';
|
||||
> import { EntitySentryContent } from '@backstage/plugin-sentry';
|
||||
>
|
||||
> const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
> <EntityPageLayout>
|
||||
> const serviceEntityPage = (
|
||||
> <EntityLayout>
|
||||
> // ...
|
||||
> <EntityPageLayout.Content
|
||||
> path="/sentry"
|
||||
> title="Sentry"
|
||||
> element={<SentryRouter entity={entity} />}
|
||||
> />
|
||||
> <EntityLayout.Route path="/sentry" title="Sentry">
|
||||
> <EntitySentryContent />
|
||||
> </EntityLayout.Route>
|
||||
> // ...
|
||||
> </EntityPageLayout>
|
||||
> </EntityLayout>
|
||||
> );
|
||||
> ```
|
||||
|
||||
4. Add the proxy config:
|
||||
3. Add the proxy config:
|
||||
|
||||
```yaml
|
||||
# app-config.yaml
|
||||
@@ -76,9 +66,9 @@ sentry:
|
||||
organization: <your-organization>
|
||||
```
|
||||
|
||||
5. Create a new internal integration with the permissions `Issues & Events: Read` (https://docs.sentry.io/product/integrations/integration-platform/) and provide it as `SENTRY_TOKEN` as env variable.
|
||||
4. Create a new internal integration with the permissions `Issues & Events: Read` (https://docs.sentry.io/product/integrations/integration-platform/) and provide it as `SENTRY_TOKEN` as env variable.
|
||||
|
||||
6. Add the `sentry.io/project-slug` annotation to your catalog-info.yaml file:
|
||||
5. Add the `sentry.io/project-slug` annotation to your catalog-info.yaml file:
|
||||
|
||||
```yaml
|
||||
apiVersion: backstage.io/v1alpha1
|
||||
|
||||
Reference in New Issue
Block a user