0.0.0-nightly-20220809025138 • Published 4 years ago

@backstage/plugin-airbrake v0.0.0-nightly-20220809025138

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

Airbrake

The Airbrake plugin provides connectivity between Backstage and Airbrake (https://airbrake.io/).

How to use

  1. Install the Frontend plugin:

    # From your Backstage root directory
    yarn add --cwd packages/app @backstage/plugin-airbrake
  2. Install the Backend plugin:

    # From your Backstage root directory
    yarn add --cwd packages/backend @backstage/plugin-airbrake-backend
  3. Add the EntityAirbrakeContent to packages/app/src/components/catalog/EntityPage.tsx for all the entity pages you want Airbrake to be in:

    import { EntityAirbrakeContent } from '@backstage/plugin-airbrake';
    
    const serviceEntityPage = (
      <EntityLayoutWrapper>
        <EntityLayout.Route path="/airbrake" title="Airbrake">
          <EntityAirbrakeContent />
        </EntityLayout.Route>
      </EntityLayoutWrapper>
    );
    
    const websiteEntityPage = (
      <EntityLayoutWrapper>
        <EntityLayout.Route path="/airbrake" title="Airbrake">
          <EntityAirbrakeContent />
        </EntityLayout.Route>
      </EntityLayoutWrapper>
    );
    
    const defaultEntityPage = (
      <EntityLayoutWrapper>
        <EntityLayout.Route path="/airbrake" title="Airbrake">
          <EntityAirbrakeContent />
        </EntityLayout.Route>
      </EntityLayoutWrapper>
    );
  4. Create packages/backend/src/plugins/airbrake.ts with these contents:

    import { Router } from 'express';
    import { PluginEnvironment } from '../types';
    import {
      createRouter,
      extractAirbrakeConfig,
    } from '@backstage/plugin-airbrake-backend';
    
    export default async function createPlugin(
      env: PluginEnvironment,
    ): Promise<Router> {
      return createRouter({
        logger: env.logger,
        airbrakeConfig: extractAirbrakeConfig(env.config),
      });
    }
  5. Setup the Backend code in packages/backend/src/index.ts:

    import airbrake from './plugins/airbrake';
    
    async function main() {
      //... After const createEnv = makeCreateEnv(config) ...
    
      const airbrakeEnv = useHotMemoize(module, () => createEnv('airbrake'));
    
      //... After const apiRouter = Router() ...
      apiRouter.use('/airbrake', await airbrake(airbrakeEnv));
    }
  6. Add this config as a top level section in your app-config.yaml:

    airbrake:
      apiKey: ${AIRBRAKE_API_KEY}
  7. Set an environment variable AIRBRAKE_API_KEY with your API key before starting Backstage backend.

  8. Add the following annotation to the catalog-info.yaml for a repo you want to link to an Airbrake project:

    metadata:
      annotations:
        airbrake.io/project-id: '123456'

Local Development

Start this plugin in standalone mode by running yarn start inside 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 directory.

A mock API will be used to run it in standalone. If you want to talk to the real API follow the instructions to start up Airbrake Backend in standalone.

0.3.35

2 years ago

0.3.34

2 years ago

0.3.34-next.1

2 years ago

0.3.34-next.0

2 years ago

0.3.33

2 years ago

0.3.32

2 years ago

0.3.31

2 years ago

0.3.31-next.2

2 years ago

0.3.31-next.1

2 years ago

0.3.31-next.0

2 years ago

0.3.30

2 years ago

0.3.30-next.3

2 years ago

0.3.30-next.2

2 years ago

0.3.30-next.1

2 years ago

0.3.30-next.0

2 years ago

0.3.29

2 years ago

0.3.29-next.2

2 years ago

0.3.29-next.1

2 years ago

0.3.29-next.0

2 years ago

0.3.28

3 years ago

0.3.28-next.3

3 years ago

0.3.28-next.2

3 years ago

0.3.28-next.1

3 years ago

0.3.24-next.2

3 years ago

0.3.20-next.2

3 years ago

0.3.24-next.1

3 years ago

0.3.20-next.1

3 years ago

0.3.24-next.3

3 years ago

0.3.23-next.0

3 years ago

0.3.28-next.0

3 years ago

0.3.26-next.1

3 years ago

0.3.26-next.2

3 years ago

0.3.26-next.0

3 years ago

0.3.20

3 years ago

0.3.27

3 years ago

0.3.26

3 years ago

0.3.25

3 years ago

0.3.24

3 years ago

0.3.23

3 years ago

0.3.22

3 years ago

0.3.21

3 years ago

0.3.25-next.0

3 years ago

0.3.25-next.1

3 years ago

0.3.25-next.2

3 years ago

0.3.21-next.2

3 years ago

0.3.21-next.0

3 years ago

0.3.21-next.1

3 years ago

0.3.19-next.3

3 years ago

0.3.19-next.2

3 years ago

0.3.20-next.0

3 years ago

0.3.19

3 years ago

0.3.19-next.1

3 years ago

0.3.19-next.0

3 years ago

0.3.18

3 years ago

0.3.18-next.1

3 years ago

0.3.18-next.2

3 years ago

0.3.17-next.3

3 years ago

0.3.17

3 years ago

0.3.18-next.0

3 years ago

0.3.16-next.2

3 years ago

0.3.16-next.1

3 years ago

0.3.16-next.0

3 years ago

0.3.17-next.0

3 years ago

0.3.17-next.1

3 years ago

0.3.17-next.2

3 years ago

0.3.16

3 years ago

0.3.15

3 years ago

0.3.15-next.0

3 years ago

0.3.15-next.1

3 years ago

0.3.15-next.2

3 years ago

0.3.14

3 years ago

0.3.14-next.1

3 years ago

0.3.14-next.2

3 years ago

0.3.11-next.0

4 years ago

0.3.11-next.1

4 years ago

0.3.13

4 years ago

0.3.12

4 years ago

0.3.11

4 years ago

0.3.10

4 years ago

0.3.12-next.0

4 years ago

0.3.12-next.1

4 years ago

0.3.12-next.2

4 years ago

0.3.14-next.0

3 years ago

0.3.12-next.3

4 years ago

0.3.12-next.4

4 years ago

0.3.10-next.0

4 years ago

0.3.10-next.1

4 years ago

0.3.10-next.2

4 years ago

0.3.9-next.1

4 years ago

0.3.9-next.0

4 years ago

0.3.9-next.3

4 years ago

0.3.9-next.2

4 years ago

0.3.9

4 years ago

0.3.6

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.8-next.1

4 years ago

0.3.7-next.1

4 years ago

0.3.6-next.1

4 years ago

0.3.7-next.0

4 years ago

0.3.7-next.3

4 years ago

0.3.7-next.2

4 years ago

0.3.6-next.0

4 years ago

0.3.8-next.0

4 years ago

0.3.5

4 years ago

0.3.5-next.2

4 years ago

0.3.5-next.0

4 years ago

0.3.5-next.1

4 years ago

0.3.2

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.4-next.1

4 years ago

0.3.2-next.0

4 years ago

0.3.4-next.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.3

4 years ago

0.1.3-next.0

4 years ago

0.1.2

4 years ago

0.1.2-next.0

4 years ago

0.1.1

4 years ago

0.1.1-next.0

4 years ago

0.1.0

4 years ago