Skip to content

Commit

Permalink
[7.x] Disable the experimental metrics_entities plugin by default. (#…
Browse files Browse the repository at this point in the history
…115460) (#115694)

* Disable the experimental `metrics_entities` plugin by default. (#115460)

This was default disabled in 7.15, but we needed a code change to maintain that (consistent) behavior.
# Conflicts:
#	x-pack/plugins/metrics_entities/server/index.ts

* Remove old config for metrics

* Remove unused imports

Co-authored-by: Robert Austin <robert.austin@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 20, 2021
1 parent 5744be6 commit 1b14443
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions x-pack/plugins/metrics_entities/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { schema } from '@kbn/config-schema';

import { PluginConfigDescriptor, PluginInitializerContext } from '../../../../src/core/server';
import { PluginInitializerContext } from '../../../../src/core/server';

import { ConfigSchema } from './config';
import { MetricsEntitiesPlugin } from './plugin';

export { MetricsEntitiesPluginSetup, MetricsEntitiesPluginStart } from './types';

// This exports static code and TypeScript types,
// as well as, Kibana Platform `plugin()` initializer.

export const config: PluginConfigDescriptor = {
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
schema: ConfigSchema,
};
export const plugin = (initializerContext: PluginInitializerContext): MetricsEntitiesPlugin => {
return new MetricsEntitiesPlugin(initializerContext);
};

export { MetricsEntitiesPluginSetup, MetricsEntitiesPluginStart } from './types';
export const config = {
schema: schema.object({
// This plugin is experimental and should be disabled by default.
enabled: schema.boolean({ defaultValue: false }),
}),
};

0 comments on commit 1b14443

Please sign in to comment.