diff options
Diffstat (limited to 'config/metrics/schema/redis.json')
-rw-r--r-- | config/metrics/schema/redis.json | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/config/metrics/schema/redis.json b/config/metrics/schema/redis.json new file mode 100644 index 00000000000..3fe3ba3e7ec --- /dev/null +++ b/config/metrics/schema/redis.json @@ -0,0 +1,95 @@ +{ + "if": { + "properties": { + "data_source": { + "const": "redis" + } + } + }, + "then": { + "oneOf": [ + { + "properties": { + "instrumentation_class": { + "const": "MergeRequestWidgetExtensionMetric" + }, + "options": { + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "widget": { + "type": "string" + } + }, + "required": [ + "event", + "widget" + ], + "additionalProperties": false + } + }, + "required": [ + "instrumentation_class", + "options" + ] + }, + { + "properties": { + "instrumentation_class": { + "const": "RedisMetric" + }, + "options": { + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "prefix": { + "type": [ + "string", + "null" + ] + }, + "include_usage_prefix": { + "type": "boolean" + } + }, + "required": [ + "event", + "prefix" + ], + "additionalProperties": false + } + }, + "required": [ + "instrumentation_class", + "options" + ] + }, + { + "properties": { + "key_path": { + "description": "Legacy metrics that do not match with the schema", + "enum": [ + "counts.dependency_list_usages_total", + "counts.network_policy_forwards", + "counts.network_policy_drops", + "counts.static_site_editor_views", + "counts.static_site_editor_commits", + "counts.static_site_editor_merge_requests", + "counts.package_events_i_package_container_delete_package", + "counts.package_events_i_package_container_pull_package", + "counts.package_events_i_package_container_push_package", + "counts.package_events_i_package_debian_push_package", + "counts.package_events_i_package_tag_delete_package", + "counts.package_events_i_package_tag_pull_package", + "counts.package_events_i_package_tag_push_package" + ] + } + } + } + ] + } +} |