Skip to content

Comments

Add appName and appVersion parameters#18

Merged
nickpeihl merged 2 commits intoelastic:masterfrom
nickpeihl:appName
Mar 4, 2020
Merged

Add appName and appVersion parameters#18
nickpeihl merged 2 commits intoelastic:masterfrom
nickpeihl:appName

Conversation

@nickpeihl
Copy link
Contributor

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.


// 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
Contributor 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