Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] [Application Usage] Functional test to validate the full list of appIds in the schema (#88080) #88681

Merged
merged 1 commit into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ const commonSchema: MakeSchemaFrom<ApplicationUsageTelemetryReport[string]> = {
},
};

// These keys obtained by searching for `/application\w*\.register\(/` and checking the value of the attr `id`.
// TODO: Find a way to update these keys automatically.
// There is a test in x-pack/test/usage_collection that validates that the keys in here match all the registered apps
export const applicationUsageSchema = {
// OSS
dashboards: commonSchema,
Expand All @@ -61,10 +60,12 @@ export const applicationUsageSchema = {
short_url_redirect: commonSchema, // It's a forward app so we'll likely never report it
timelion: commonSchema,
visualize: commonSchema,
error: commonSchema,
status: commonSchema,
kibanaOverview: commonSchema,

// X-Pack
apm: commonSchema,
csm: commonSchema,
canvas: commonSchema,
dashboard_mode: commonSchema, // It's a forward app so we'll likely never report it
enterpriseSearch: commonSchema,
Expand All @@ -75,6 +76,7 @@ export const applicationUsageSchema = {
metrics: commonSchema,
infra: commonSchema, // It's a forward app so we'll likely never report it
fleet: commonSchema,
ingestManager: commonSchema,
lens: commonSchema,
maps: commonSchema,
ml: commonSchema,
Expand All @@ -98,4 +100,5 @@ export const applicationUsageSchema = {
siem: commonSchema,
space_selector: commonSchema,
uptime: commonSchema,
ux: commonSchema,
};
288 changes: 286 additions & 2 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
}
}
},
"apm": {
"error": {
"properties": {
"appId": {
"type": "keyword"
Expand Down Expand Up @@ -790,7 +790,149 @@
}
}
},
"csm": {
"status": {
"properties": {
"appId": {
"type": "keyword"
},
"viewId": {
"type": "keyword"
},
"clicks_total": {
"type": "long"
},
"clicks_7_days": {
"type": "long"
},
"clicks_30_days": {
"type": "long"
},
"clicks_90_days": {
"type": "long"
},
"minutes_on_screen_total": {
"type": "float"
},
"minutes_on_screen_7_days": {
"type": "float"
},
"minutes_on_screen_30_days": {
"type": "float"
},
"minutes_on_screen_90_days": {
"type": "float"
},
"views": {
"type": "array",
"items": {
"properties": {
"appId": {
"type": "keyword"
},
"viewId": {
"type": "keyword"
},
"clicks_total": {
"type": "long"
},
"clicks_7_days": {
"type": "long"
},
"clicks_30_days": {
"type": "long"
},
"clicks_90_days": {
"type": "long"
},
"minutes_on_screen_total": {
"type": "float"
},
"minutes_on_screen_7_days": {
"type": "float"
},
"minutes_on_screen_30_days": {
"type": "float"
},
"minutes_on_screen_90_days": {
"type": "float"
}
}
}
}
}
},
"kibanaOverview": {
"properties": {
"appId": {
"type": "keyword"
},
"viewId": {
"type": "keyword"
},
"clicks_total": {
"type": "long"
},
"clicks_7_days": {
"type": "long"
},
"clicks_30_days": {
"type": "long"
},
"clicks_90_days": {
"type": "long"
},
"minutes_on_screen_total": {
"type": "float"
},
"minutes_on_screen_7_days": {
"type": "float"
},
"minutes_on_screen_30_days": {
"type": "float"
},
"minutes_on_screen_90_days": {
"type": "float"
},
"views": {
"type": "array",
"items": {
"properties": {
"appId": {
"type": "keyword"
},
"viewId": {
"type": "keyword"
},
"clicks_total": {
"type": "long"
},
"clicks_7_days": {
"type": "long"
},
"clicks_30_days": {
"type": "long"
},
"clicks_90_days": {
"type": "long"
},
"minutes_on_screen_total": {
"type": "float"
},
"minutes_on_screen_7_days": {
"type": "float"
},
"minutes_on_screen_30_days": {
"type": "float"
},
"minutes_on_screen_90_days": {
"type": "float"
}
}
}
}
}
},
"apm": {
"properties": {
"appId": {
"type": "keyword"
Expand Down Expand Up @@ -1571,6 +1713,77 @@
}
}
},
"ingestManager": {
"properties": {
"appId": {
"type": "keyword"
},
"viewId": {
"type": "keyword"
},
"clicks_total": {
"type": "long"
},
"clicks_7_days": {
"type": "long"
},
"clicks_30_days": {
"type": "long"
},
"clicks_90_days": {
"type": "long"
},
"minutes_on_screen_total": {
"type": "float"
},
"minutes_on_screen_7_days": {
"type": "float"
},
"minutes_on_screen_30_days": {
"type": "float"
},
"minutes_on_screen_90_days": {
"type": "float"
},
"views": {
"type": "array",
"items": {
"properties": {
"appId": {
"type": "keyword"
},
"viewId": {
"type": "keyword"
},
"clicks_total": {
"type": "long"
},
"clicks_7_days": {
"type": "long"
},
"clicks_30_days": {
"type": "long"
},
"clicks_90_days": {
"type": "long"
},
"minutes_on_screen_total": {
"type": "float"
},
"minutes_on_screen_7_days": {
"type": "float"
},
"minutes_on_screen_30_days": {
"type": "float"
},
"minutes_on_screen_90_days": {
"type": "float"
}
}
}
}
}
},
"lens": {
"properties": {
"appId": {
Expand Down Expand Up @@ -3203,6 +3416,77 @@
}
}
}
},
"ux": {
"properties": {
"appId": {
"type": "keyword"
},
"viewId": {
"type": "keyword"
},
"clicks_total": {
"type": "long"
},
"clicks_7_days": {
"type": "long"
},
"clicks_30_days": {
"type": "long"
},
"clicks_90_days": {
"type": "long"
},
"minutes_on_screen_total": {
"type": "float"
},
"minutes_on_screen_7_days": {
"type": "float"
},
"minutes_on_screen_30_days": {
"type": "float"
},
"minutes_on_screen_90_days": {
"type": "float"
},
"views": {
"type": "array",
"items": {
"properties": {
"appId": {
"type": "keyword"
},
"viewId": {
"type": "keyword"
},
"clicks_total": {
"type": "long"
},
"clicks_7_days": {
"type": "long"
},
"clicks_30_days": {
"type": "long"
},
"clicks_90_days": {
"type": "long"
},
"minutes_on_screen_total": {
"type": "float"
},
"minutes_on_screen_7_days": {
"type": "float"
},
"minutes_on_screen_30_days": {
"type": "float"
},
"minutes_on_screen_90_days": {
"type": "float"
}
}
}
}
}
}
}
},
Expand Down
1 change: 1 addition & 0 deletions test/scripts/jenkins_xpack_build_plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ node scripts/build_kibana_platform_plugins \
--scan-dir "$XPACK_DIR/test/plugin_api_integration/plugins" \
--scan-dir "$XPACK_DIR/test/plugin_api_perf/plugins" \
--scan-dir "$XPACK_DIR/test/licensing_plugin/plugins" \
--scan-dir "$XPACK_DIR/test/usage_collection/plugins" \
--workers 12 \
--verbose
1 change: 1 addition & 0 deletions x-pack/scripts/functional_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@ require('@kbn/test').runTestsCli([
require.resolve('../test/saved_object_tagging/functional/config.ts'),
require.resolve('../test/saved_object_tagging/api_integration/security_and_spaces/config.ts'),
require.resolve('../test/saved_object_tagging/api_integration/tagging_api/config.ts'),
require.resolve('../test/usage_collection/config.ts'),
]);
Loading