Files
backstage/plugins/rollbar
blam e44cb85b22 Merge branch 'master' of github.com:spotify/backstage into migrate-to-msw
* 'master' of github.com:spotify/backstage: (66 commits)
  chore: fix lerna linting
  v0.1.1-alpha.25
  Add Code Insights plugin to sample app and marketplace (#2833)
  Improve main CI build status badge in README (#2866)
  Update roadmap: Design System 🚢 (#2858)
  github/codecov: switch to informational mode
  github/workflows: use the tip of master as the base for comparing PR code coverage
  make saml provider path from globalConfig (#2855)
  fix(catalog-backend): limit search value lengths
  Update project Copyright (#2852)
  fix(catalog-backend): actually use modified entity output (default namespace was broken)
  remove unnecessary center keyword
  Move card header bg to up contrast, fix #2558
  Update name of env authentication env vars
  Fix feedback from dtuite
  Remove chart testing workflow for now
  Only lint charts on Pull Requests
  Move the k8s deployment docs to its own helm deployment page
  Remove line in initdb script that creates backend db
  Use app-config.development.yaml to provide configuration instead of local
  ...
2020-10-13 03:56:13 +02:00
..
2020-07-08 22:44:49 -04:00
2020-07-08 22:44:49 -04:00

Rollbar Plugin

Website: https://rollbar.com/

Setup

  1. Configure the rollbar backend plugin

  2. If you have standalone app (you didn't clone this repo), then do

yarn add @backstage/plugin-rollbar
  1. Add plugin to the list of plugins:
// packages/app/src/plugins.ts
export { plugin as Rollbar } from '@backstage/plugin-rollbar';
  1. Add plugin API to your Backstage instance:
// packages/app/src/api.ts
import { RollbarClient, rollbarApiRef } from '@backstage/plugin-rollbar';

// ...
builder.add(rollbarApiRef, new RollbarClient({ discoveryApi }));
  1. Add to the app EntityPage component:
// packages/app/src/components/catalog/EntityPage.tsx
import { Router as RollbarRouter } from '@backstage/plugin-rollbar';

// ...
const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
  <EntityPageLayout>
    // ...
    <EntityPageLayout.Content
      path="/rollbar"
      title="Errors"
      element={<RollbarRouter entity={entity} />}
    />
  </EntityPageLayout>
);
  1. Setup the app.config.yaml and account token environment variable
# app.config.yaml
rollbar:
  organization: spotify
  accountToken:
    $env: ROLLBAR_ACCOUNT_TOKEN
  1. Annotate entities with the rollbar project slug
# pump-station-catalog-component.yaml
# ...
metadata:
  annotations:
    rollbar.com/project-slug: organization-name/project-name
    # -- or just ---
    rollbar.com/project-slug: project-name
  1. Run app with yarn start and navigate to /rollbar or a catalog entity

Features

  • List rollbar entities that are annotated with rollbar.com/project-slug
  • View top active items for each rollbar annotated entity

Limitations

  • Rollbar has rate limits per token