message: Make the plugin aware of the NR API.
diff: * limitations under the License.
  */
  -import { createPlugin, createRouteRef } from '@backstage/core';
  +import {
  + createApiFactory,
  + createPlugin,
  + createRouteRef,
  + discoveryApiRef,
  +} from '@backstage/core';
  +import { NewRelicApi, newRelicApiRef } from './api';
  import NewRelicComponent from './components/NewRelicComponent';
  export const rootRouteRef = createRouteRef({
  @@ -24,6 +30,13 @@ export const rootRouteRef = createRouteRef({
  export const plugin = createPlugin({
  id: 'newrelic',
  + apis: [
  + createApiFactory({
  + api: newRelicApiRef,
  + deps: { discoveryApi: discoveryApiRef },
  + factory: ({ discoveryApi }) => new NewRelicApi({ discoveryApi }),
  + }),
  + ],
  register({ router }) {
  router.addRoute(rootRouteRef, NewRelicComponent);
  },
  