This is an OPTIONAL plugin for frontlogger library to support Reporting API out of the box.
More info on the approach can be found here: https://developer.chrome.com/articles/reporting-observer/
import { reportingObserverPlugin } from '@dodobrands/frontlogger-observer-plugin'
import { Logger, useSink, consoleSink, usePlugin } from '@dodobrands/frontlogger'
const logger = new Logger({
applicationName: 'your-frontend-app',
sinks: [useSink(consoleSink)],
environmentName: global.window.location.hostname,
plugins: [reportingObserverPlugin({})]
})