The tests in x-pack/test/usage_collection/test_suites/application_usage run Kibana with the default configuration and check that all registered UI apps are listed in the telemetry schema.
As highlighted in https://github.com/elastic/kibana/issues/90536#issuecomment-2302644522, there are some apps that are conditionally registered (either via license checks, internal plugin settings, or full plugin disablement). The current runtime-based test are missing many of those conditionally-enabled apps.
We might want to consider changing the strategy of the test to an AST parser, ESlint rule, or Core constant/enum.
Probably the ESlint rule is the best compromise (no need to involve core or change the API) while still validating that the app ID provided to the register API is
core.application.register({
id: 'my-app-id', // <-- ESLint to check the string here adheres to the known list
mount: async (params: AppMountParameters) => {
return renderApp();
},
...
});
Flagging as technical debt instead of bug because the telemetry schemas serve an internal documentation and tracing purpose, and it doesn't directly affect our customers (internal and external).
The tests in
x-pack/test/usage_collection/test_suites/application_usage
run Kibana with the default configuration and check that all registered UI apps are listed in the telemetry schema.As highlighted in https://github.com/elastic/kibana/issues/90536#issuecomment-2302644522, there are some apps that are conditionally registered (either via license checks, internal plugin settings, or full plugin disablement). The current runtime-based test are missing many of those conditionally-enabled apps.
We might want to consider changing the strategy of the test to an AST parser, ESlint rule, or Core constant/enum.
Probably the ESlint rule is the best compromise (no need to involve core or change the API) while still validating that the app ID provided to the register API is
Flagging as
technical debt
instead ofbug
because the telemetry schemas serve an internal documentation and tracing purpose, and it doesn't directly affect our customers (internal and external).