Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config/metrics/schema/redis_hll.json')
-rw-r--r--config/metrics/schema/redis_hll.json103
1 files changed, 103 insertions, 0 deletions
diff --git a/config/metrics/schema/redis_hll.json b/config/metrics/schema/redis_hll.json
new file mode 100644
index 00000000000..35d520a5833
--- /dev/null
+++ b/config/metrics/schema/redis_hll.json
@@ -0,0 +1,103 @@
+{
+ "if": {
+ "properties": {
+ "data_source": {
+ "const": "redis_hll"
+ }
+ }
+ },
+ "then": {
+ "oneOf": [
+ {
+ "properties": {
+ "instrumentation_class": {
+ "const": "RedisHLLMetric"
+ },
+ "options": {
+ "type": "object",
+ "properties": {
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "events"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "instrumentation_class",
+ "options"
+ ]
+ },
+ {
+ "properties": {
+ "instrumentation_class": {
+ "const": "AggregatedMetric"
+ },
+ "options": {
+ "type": "object",
+ "properties": {
+ "aggregate": {
+ "type": "object",
+ "properties": {
+ "operator": {
+ "enum": [
+ "OR",
+ "AND"
+ ]
+ },
+ "attribute": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "operator",
+ "attribute"
+ ],
+ "additionalProperties": false
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "aggregate",
+ "events"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "instrumentation_class",
+ "options"
+ ]
+ },
+ {
+ "properties": {
+ "key_path": {
+ "description": "Legacy metrics that do not match with the schema",
+ "enum": [
+ "usage_activity_by_stage_monthly.create.merge_requests_users",
+ "usage_activity_by_stage_monthly.create.action_monthly_active_users_web_ide_edit",
+ "usage_activity_by_stage_monthly.create.action_monthly_active_users_sfe_edit",
+ "usage_activity_by_stage_monthly.create.action_monthly_active_users_snippet_editor_edit",
+ "usage_activity_by_stage_monthly.create.action_monthly_active_users_sse_edit",
+ "counts_monthly.aggregated_metrics.product_analytics_test_metrics_union",
+ "counts_weekly.aggregated_metrics.product_analytics_test_metrics_union",
+ "counts_monthly.aggregated_metrics.product_analytics_test_metrics_intersection",
+ "counts_weekly.aggregated_metrics.product_analytics_test_metrics_intersection"
+ ]
+ }
+ }
+ }
+ ]
+ }
+}