mozilla / probe-scraper

Scrape and publish Telemetry probe data from Firefox
https://mozilla.github.io/probe-scraper/
Mozilla Public License 2.0
21 stars 53 forks source link

Update type definition of a metric on each scrape #679

Closed badboy closed 8 months ago

badboy commented 8 months ago

In rare cases the type can change. We always pick the latest one.

Fixes #677


Tested with:

python3 -m probe_scraper.runner --dry-run --cache-dir tmp/cache --out-dir tmp/out --glean --glean-repo moso-mastodon-web --update --glean-limit-date=2024-01-01 --output-bucket=gs://probe-scraper-prod-artifacts/

Before:

$ gron tmp/out/glean/moso-mastodon-web/metrics | rg web.page_url.+type
json["web.page_url"].history[0].type = "string";
json["web.page_url"].history[1].type = "string";
json["web.page_url"].history[2].type = "url";
json["web.page_url"].type = "string";

After:

$ gron tmp/out/glean/moso-mastodon-web/metrics | rg web.page_url.+type
json["web.page_url"].history[0].type = "string";
json["web.page_url"].history[1].type = "string";
json["web.page_url"].history[2].type = "url";
json["web.page_url"].type = "url";

* gron