diff --git a/.circleci/config.yml b/.circleci/config.yml index b64d2e433..ca1f70a9e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -131,8 +131,7 @@ jobs: printf '{"commit":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}\n' "$CIRCLE_SHA1" "$CIRCLE_TAG" "$CIRCLE_PROJECT_USERNAME" - "$CIRCLE_PROJECT_REPONAME" "$CIRCLE_BUILD_URL" - > version.json + "$CIRCLE_PROJECT_REPONAME" "$CIRCLE_BUILD_URL" > version.json - run: name: Output version.json command: cat version.json @@ -144,7 +143,7 @@ jobs: tag: $CIRCLE_TAG registry-url: gcr.io - gcp-gcr/push-image: - image: auth0-proxy + image: auth0-proxy registry-url: gcr.io tag: $CIRCLE_TAG google-project-id: GOOGLE_PROJECT_ID diff --git a/src/components/SqlModal.svelte b/src/components/SqlModal.svelte index 24756adb5..3a3e11140 100644 --- a/src/components/SqlModal.svelte +++ b/src/components/SqlModal.svelte @@ -8,6 +8,8 @@ import desktopTelemetrySql from '../stringTemplates/desktop-telemetry.tpl'; import desktopDistributionSql from '../stringTemplates/desktop-distribution.tpl'; import desktopHistogramProportionsSql from '../stringTemplates/desktop-histogram-proportions.tpl'; + import fenixGlamSql from '../stringTemplates/fenix-glam.tpl'; + import desktopGlamSql from '../stringTemplates/desktop-glam.tpl'; let sqlElement; let status; @@ -28,6 +30,40 @@ sqlElement.style.transition = ''; }, 500); } + function getGlamSql() { + const osFilter = + $store.productDimensions.os === '*' + ? 'os IS NULL' + : `os="${$store.productDimensions.os}"`; + const buildIdFilter = + $store.productDimensions.aggregationLevel === 'build_id' + ? 'app_build_id IS NOT NULL' + : 'app_build_id IS NULL'; + const processFilter = $store.productDimensions.process + ? `AND process="${$store.productDimensions.process}"` + : ''; + return _.template(desktopGlamSql)({ + metric: $store.probe.name, + channel: $store.productDimensions.channel, + osFilter, + buildIdFilter, + processFilter, + }); + } + + function getFenixGlamSql() { + const buildIdFilter = + $store.productDimensions.aggregationLevel === 'build_id' + ? 'app_build_id!="*"' + : 'app_build_id="*"'; + return _.template(fenixGlamSql)({ + app_id: $store.productDimensions.app_id, + metric: $store.probe.name.replace('.', '_'), + os: $store.productDimensions.os, + ping_type: $store.productDimensions.ping_type, + buildIdFilter, + }); + } function getDesktopSql(tpl = 'telemetry') { // TODO: Use the time horizon to date window in SQL? @@ -80,6 +116,11 @@ const tabs = []; if ($store.product === 'firefox') { + tabs.push({ + id: 2, + label: 'GLAM SQL', + sql: getGlamSql, + }); // Telemetry SQL only works on histograms. if ($store.probe.type === 'histogram') { tabs.push({ @@ -87,12 +128,13 @@ label: 'Telemetry SQL', sql: getDesktopSql, }); - tabs.push({ - id: 2, - label: 'Distribution SQL', - sql: getDesktopSql, - }); } + } else if ($store.product === 'fenix') { + tabs.push({ + id: 1, + label: 'GLAM SQL', + sql: getFenixGlamSql, + }); } @@ -202,8 +244,9 @@

Sorry, this feature is not available for Glean metrics yet.

{:else}

- The following SQL query can be copy/pasted and used in the BigQuery - console to explore this data further: + The following SQL query can be copied and used in the BigQuery console + to explore further. Please note that you need internal access to our + analysis tooling to query the data.

{/if}