From 1fac02f6aee8e6d7a9a82bd8741b04e0a8528dd0 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Wed, 28 Jul 2021 22:39:29 +0200 Subject: [PATCH] Add better tags to InfluxDB for GPSI data. (#3429) --- lib/plugins/influxdb/data-generator.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/plugins/influxdb/data-generator.js b/lib/plugins/influxdb/data-generator.js index 6c6466b6c..5cb845804 100644 --- a/lib/plugins/influxdb/data-generator.js +++ b/lib/plugins/influxdb/data-generator.js @@ -207,6 +207,16 @@ class InfluxDBDataGenerator { tags.experience = keyArray[0]; tags.formFactor = keyArray[1]; tags.metric = keyArray[2]; + } else if (type === 'gpsi.pageSummary') { + if (key.indexOf('googleWebVitals') > -1) { + tags.testType = 'googleWebVitals'; + } else if (key.indexOf('score') > -1) { + tags.testType = 'score'; + } else if (key.indexOf('loadingExperience') > -1) { + tags.experience = keyArray[0]; + tags.metric = keyArray[1]; + tags.testType = 'crux'; + } } else { // console.log('Missed added tags to ' + key + ' ' + type); }