Provide namespace-level queries for new internal event metrics in metrics dictionary
Problem
The new metric definitions for internal events provide the potential to define a "uniqueness" criteria via the metric.yml file. At the same time, since we are sending Snowplow events and RedisHLL events at the same time. There's two different queries that can be done to retrieve the value of a metric:
- A query for the RedisHLL value which is can be compared across instances
- A query for the Snowplow value, which is only emitted from Gitlab.com but allows for grouping by namespace.
Coming up with the second query on the spot is complex and potentially error-prone but an often cited use-case.
The Metric Dictionary currently only provides an automatic copy-paste solution of the first type of query.
Desired Outcome
To allow for easier usability around the new events the Metric Dictionary should provide both above mentioned types of queries for the new internal events.
Proposed Solution
- Rename the column
Sisense Query for Gitlab.com
toSisense Query
- Rename the current button for all source types to
Copy query for Gitlab.com
- For
source=events
have 2 buttons-
Copy query for Gitlab.com
. The resulting query should include all:- Count of all snowplow events for the metric in accordance with the metric (e.g. unique user count)
- Grouped by namespace
- Scoped by last month
-
Copy query for Self-Managed
. The resulting query should include:- Last reported RedisHLL metric number from the Service Ping grouped by Self-Managed instance
-
See #411455 (comment 1404703911) for guidance on which Data Warehouse relation to use.