elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.69k stars 8.24k forks source link

[User Experience] - Core Web Vitals coverage calculation is invalid for sampled RUM traffic #155164

Open simonhearne opened 1 year ago

simonhearne commented 1 year ago

Kibana version: 8.x

APM JavaScript Agent version: 5.12.0

Steps to reproduce:

  1. Enable RUM / APM JavaScript Agent
  2. Observe Core Web Vitals coverage is >0% (in /app/ux: xx% of the traffic reported)
  3. Enable 10% sampling (i.e. transactionSampleRate: 0.1)
  4. Observe that reported Core Web Vitals coverage drops by 10x

Expected behavior: reported Core Web Vitals coverage should not change with sample rate changes.

Cause of issue:: The CWV coverage widget uses totalPageViews as the divisor, but should used the number of sampled-in pageviews as CWV values are removed from sampled-out transactions:

https://github.com/elastic/kibana/blob/main/x-pack/plugins/exploratory_view/public/components/shared/core_web_vitals/web_core_vitals_title.tsx#L104

elasticmachine commented 1 year ago

Pinging @elastic/apm-ui (Team:APM)

elasticmachine commented 1 year ago

Pinging @elastic/uptime (Team:uptime)

dgieselaar commented 1 year ago

@simonhearne thanks for reporting this - I've routed it to the Synthetics/Uptime team as they're responsible for the User Experience app.