Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin uses wrong field when writing metrics to InfluxDB #91

Open
dammg opened this issue Aug 31, 2021 · 2 comments
Open

Plugin uses wrong field when writing metrics to InfluxDB #91

dammg opened this issue Aug 31, 2021 · 2 comments

Comments

@dammg
Copy link

dammg commented Aug 31, 2021

Hi there. I noticed that the plugin writes its metrics to InfluxDB differently than the core sitespeed app. This way you have to query the data in very unorthodox ways. See difference in sitespeed verbose log:

Sitespeed core:
(correctly uses series name for the measurement)

{
"tags": {
"device": "desktop",
"stage": "produktion",
"origin": "browsertime",
"summaryType": "summary",
"connectivity": "native",
"browser": "chrome",
"group": "www_enbw_com",
"testName": "www_enbw_com"
},
"seriesName": "firstPaint",
"point": {
"time": 1630409179532,
"median": 483
}
},

Lighthouse plugin:
(uses extra "audit" tag for the actual series name...and the series name is the unit???)

{
"tags": {
"audit": "first-contentful-paint",
"device": "desktop",
"stage": "produktion",
"origin": "lighthouse",
"summaryType": "pageSummary",
"page": "_unternehmen_",
"group": "www_enbw_com",
"testName": "www_enbw_com"
},
"seriesName": "numericValue",
"point": {
"time": 1630409179532,
"value": 1454.0010000000002
}
},

Also see the difference in Grafana query:

image

Any chance, this will be fixed in the future?
Cheers!

@soulgalore
Copy link
Member

Hi @dammg thanks for creating the issue. I'm no Lighthouse user andI guessed we missed that. There are some special handling of converting the Lighthouse structure to Influx so a fix need to happen there: https://github.com/sitespeedio/sitespeed.io/blob/main/lib/plugins/influxdb/data-generator.js#L197-L205

@shrutiseth
Copy link

Hello @dammg -

I am setting up Sitespeedio to test the sites in my project. However, since Docker is not allowed, I am installing the NPM package on windows. Influx DB+Grafana setup isnt available, so I am trying to build the dashboard specially for Lighthouse reports similar to Plus1 dashboard of Docker setup.

  1. Can you please help me understand, where can I see the data that is written to Influx DB? (similar to what you have posted)
image
  1. If you already have a setup of Sitespeedio(NPM on windows)+InfluxDB+Grafana, please do share, as it would be very helpful. Am from testing background and not a developer.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants