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

[APM] Collect telemetry about data/API performance #51612

Merged
merged 3 commits into from
Mar 23, 2020
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
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want a specific flag to disable APM-only telemetry (while the rest of the telemetry is enabled)? Wouldn't that complicate the analysis about the usage? aka: how can I tell APM is used but not reporting telemetry because it's disabled?
We could do that by checking the application_usage.apm stats... but I'd like @alexfrancoeur thoughts on this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to get some additional feedback 👍🏻the reason why I've added it because we want an escape hatch in case the queries are too expensive, without requiring our users to disable telemetry altogether in those cases.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afharo If you don't mind, I'll merge this in given the time constraints, but let me know if there's anything we need to change.

}).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