rsnext/test/integration/relay-analytics/pages/_app.js
Prateek Bhatnagar 5a82812568
Adding new types of performance monitoring (#10421)
* add new types of performance monitoring

* adding LCP

* adding cls to perf relayer

* add test for cls and lcp

* nit fixes

* re-organizing code

* fixing tests for lcp

* updating size limits in test
2020-02-28 17:44:03 -06:00

15 lines
383 B
JavaScript

/* global localStorage */
/* eslint-disable camelcase */
import App from 'next/app'
export default class MyApp extends App {}
/*
Method is experimental and will eventually be handled in a Next.js plugin
*/
export function unstable_onPerformanceData(data) {
localStorage.setItem(
data.name || data.entryType,
data.value !== undefined ? data.value : data.startTime
)
}