sitespeed.io
sitespeed.io copied to clipboard
Domain name on Influxdb
Hi, we are using Influxdb to save scan report data and we have a problem on domain name because the saved value for domain is in IDN format (example edonè.com became xn--edon-8oa.com) and this is a problem for a Db to have a right order or search not using specific function in where clause. The last db (Influxdb e Graphite too) can save the plain format without a problem.
Is it a bug or a or something desired for other motivation ?
Thank you very much
Hi @quartex I think we haven't thought about it before. Do you have time to have a look and check if you can do a PR for it? I think it comes from when we use nodejs URL parser and takes the domain from it. I can guide you.
Best Peter
It needs to be behind a switch/cli flag so it is backward compatible. One way could be to just fix it for Graphite/Grafana probably somewhere in https://github.com/sitespeedio/sitespeed.io/blob/master/lib/support/tsdbUtil.js
Ok ... we try to find best solution and we want to use punycode.js library to fix it Is it ok ?
Hey,
an idea would be to simply call punycode.toUnicode(idn_encoded_url)
(or something similar), but I'm struggling to find where that line may go. Where is the "wrongly formatted" url in that?
Do you have any ideas?
Hey @mendaomn it's the group. The idea from the beginning was to call it "group" to be able to group URLs on other ways that domains but in practice we only group by domain so group is domain.
Best Peter
Alright, I'll put together a PR (: