remove un-needed line in docs and update changeset to use a link

Signed-off-by: Christopher Diaz <codingdiaz@icloud.com>
This commit is contained in:
Christopher Diaz
2024-06-19 11:21:41 -04:00
committed by Fredrik Adelöw
parent 16589947aa
commit d3f280b51f
2 changed files with 3 additions and 34 deletions
+2 -33
View File
@@ -4,36 +4,5 @@
Creates a new module to make logging catalog errors simple. This module subscribes to catalog events and logs them.
Catalog errors are published to the [events plugin](https://github.com/backstage/backstage/tree/master/plugins/events-node): `@backstage/plugin-events-node`. You can subscribe to events and respond to errors, for example you may wish to log them.
The first step is to add the events backend plugin to your Backstage application. Navigate to your Backstage application directory and add the plugin package.
```ts
# From your Backstage root directory
yarn --cwd packages/backend add @backstage/plugin-events-node
```
Now you can install the events backend plugin in your backend.
```ts title="packages/backend/src/index.ts"
backend.add(import('@backstage/plugin-events-backend/alpha'));
```
Install the catalog logs module.
```ts
# From your Backstage root directory
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-logs
```
Add the module to your backend.
```ts title="packages/backend/src/index.ts"
backend.add(import('@backstage/plugin-catalog-backend-module-logs'));
```
You should now see logs as the catalog emits events. Example:
```
[1] 2024-06-07T00:00:28.787Z events warn Policy check failed for user:default/guest; caused by Error: Malformed envelope, /metadata/tags must be array entity=user:default/guest location=file:/Users/foobar/code/backstage-demo-instance/examples/org.yaml
```
See [Backstage documentation](https://backstage.io/docs/features/software-catalog/configuration#subscribing-to-catalog-errors) for details on how to install
and configure the plugin.
@@ -222,7 +222,7 @@ You should now see logs as the catalog emits events. Example:
### Custom Error Handling
If you wish to handle catalog errors with logic the following should help you get started.
If you wish to handle catalog errors with specific logic different from logging the errors the following should help you get started. For example, you may wish to send a notification or create a ticket for someone to investigate.
Create a backend module that subscribes to the catalog error events. The topic is `experimental.catalog.errors`.