Faro Service

The FaroService class is designed to initialize and configure the Faro monitoring tool, which is used for tracking errors, performance, and analytics in web applications.

How to use the component in your app :

  1. Import FaroService :

import { FaroService } from '@tradinos/cms-frontend-error-handler';
  1. Add the URL that you want to track the error on to your environment file in the app:

enviroment.ts
export const environment: {
  CMS_ERROR_URL: 'https://tradinos-cms-alloy.8byteslab.com/collect',
};
  1. Initialize the URL in your app config file:

const initFn = (faroService: FaroService) =>
  faroService.initializeFaroWithUrl(environment.CMS_ERROR_URL);

export const appConfig: ApplicationConfig = {
  providers: [
    ...
    provideAppInitializer(() => initFn(inject(FaroService))),
  ],
};
  1. Add the initial error to app component:

Last updated