sui icon indicating copy to clipboard operation
sui copied to clipboard

feat(packages/sui-react-web-vitals): adding device perf params to logger.cwv tracks

Open ivanmlaborda opened this issue 1 year ago • 1 comments
trafficstars

Adding device perf params to logger.cwv tracks

Description

To distinguish interactions based on connection quality, and device performance in OpenSearch CWV logs we need to add these parameters to the logged data.

effectiveConnection, deviceMemory, hardwareConcurrency

example data sent to Mushroom imatge

This data can be calculated and setted in suiContextFactory in our webapps

const hardwareConcurrency = isClient && navigator.hardwareConcurrency
const effectiveConnection = isClient && navigator.connection?.effectiveType
const deviceMemory = isClient && navigator.deviceMemory

must be added to browser property in the Context

{
  ...
  browser: {
    ...
    effectiveConnection,
    deviceMemory,
    hardwareConcurrency
  }
}

ivanmlaborda avatar Feb 08 '24 14:02 ivanmlaborda

With this #1724 you don't need change the web app.

nucliweb avatar Feb 08 '24 16:02 nucliweb