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

Add appName and appVersion parameters #18

Merged
merged 2 commits into from
Mar 4, 2020
Merged

Conversation

nickpeihl
Copy link
Member

Fixes #17.

This PR adds an appName parameter to the constructor which updates the my_app_name parameter in the query string in requests to EMS. Previously, my_app_name was hardcoded to "kibana", but we should support additional clients such as ems-landing-page. appName defaults to "kibana" if not specified.

This PR also adds a appVersion parameter designed to replace the kbnVersion parameter in the constructor since kbnVersion is a bit of a misnomer since ems-client supports additional clients besides Kibana. A deprecation warning is logged if kbnVersion is specified. Both appVersion and kbnVersion apply the my_app_version query string parameter in requests to EMS. If not specified, appVersion falls back to the kbnVersion parameter.

Also deprecate the kbnVersion parameter
Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

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

thx for thinking ahead.

@@ -104,11 +106,16 @@ export class EMSClient {
proxyPath,
}) {

// Remove kbnVersion in 8.0
if (kbnVersion) {
console.warn('The "kbnVersion" parameter for ems-client is deprecated. Please use "appVersion" instead.');
Copy link
Contributor

Choose a reason for hiding this comment

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

thx. I guess we'll need corresponding Kibana update then as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

thx. I guess we'll need corresponding Kibana update then as well?

Yup. This will be part of the changes we need when we bump the ems-client dependency in Kibana and ems-landing-page for 7.7.

@nickpeihl nickpeihl merged commit 399d615 into elastic:master Mar 4, 2020
@nickpeihl nickpeihl deleted the appName branch March 4, 2020 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow my_app_name to be configurable
2 participants