Skip to content

Commit

Permalink
[APM] Collect telemetry about data/API performance (#51612)
Browse files Browse the repository at this point in the history
* [APM] Collect telemetry about data/API performance

Closes #50757.

* Ignore apm scripts package.json

* Config flag for enabling/disabling telemetry collection
  • Loading branch information
dgieselaar authored Mar 23, 2020
1 parent fa69765 commit 13baa51
Show file tree
Hide file tree
Showing 31 changed files with 2,387 additions and 206 deletions.
2 changes: 2 additions & 0 deletions src/dev/run_check_lockfile_symlinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const IGNORE_FILE_GLOBS = [
'**/*fixtures*/**/*',
// cypress isn't used in production, ignore it
'x-pack/legacy/plugins/apm/e2e/*',
// apm scripts aren't used in production, ignore them
'x-pack/legacy/plugins/apm/scripts/*',
];

run(async ({ log }) => {
Expand Down
19 changes: 15 additions & 4 deletions x-pack/legacy/plugins/apm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ import mappings from './mappings.json';

export const apm: LegacyPluginInitializer = kibana => {
return new kibana.Plugin({
require: ['kibana', 'elasticsearch', 'xpack_main', 'apm_oss'],
require: [
'kibana',
'elasticsearch',
'xpack_main',
'apm_oss',
'task_manager'
],
id: 'apm',
configPrefix: 'xpack.apm',
publicDir: resolve(__dirname, 'public'),
Expand Down Expand Up @@ -71,7 +77,10 @@ export const apm: LegacyPluginInitializer = kibana => {
autocreateApmIndexPattern: Joi.boolean().default(true),

// service map
serviceMapEnabled: Joi.boolean().default(true)
serviceMapEnabled: Joi.boolean().default(true),

// telemetry
telemetryCollectionEnabled: Joi.boolean().default(true)
}).default();
},

Expand Down Expand Up @@ -107,10 +116,12 @@ export const apm: LegacyPluginInitializer = kibana => {
}
}
});

const apmPlugin = server.newPlatform.setup.plugins
.apm as APMPluginContract;
apmPlugin.registerLegacyAPI({ server });

apmPlugin.registerLegacyAPI({
server
});
}
});
};
Loading

0 comments on commit 13baa51

Please sign in to comment.