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

Allow headers config to propagate in callAsCurrentUser #34610

Merged
merged 18 commits into from
Jun 5, 2019

Conversation

Bamieh
Copy link
Member

@Bamieh Bamieh commented Apr 5, 2019

Allow clientParams.headers config to propagate in callAsCurrentUser. The current implementation overrides the object whenever this.headers is set which provides inconsistent and undesired behavior.

This PR also adds a header when hitting Telemetry monitoring indexes. In case we want to filter / track those es queries from cloud billing. I added this in the same PR since the change is very trivial and I introduced the fix for this use-case.

Adds the following header to the ES query when telemetry hits monitoring indexes to gather usage data.

Headers: [ 'X-QUERY-SOURCE': 'TELEMETRY ]

More context:
https://github.com/elastic/kibana/pull/28344/files#r257774129

CC @alexfrancoeur, @azasypkin

@Bamieh Bamieh added Feature:elasticsearch Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:Telemetry labels Apr 5, 2019
@Bamieh Bamieh requested a review from a team as a code owner April 5, 2019 08:43
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@Bamieh Bamieh requested a review from epixa April 17, 2019 12:50
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@Bamieh Bamieh requested review from bmcconaghy and removed request for epixa June 4, 2019 16:03
Copy link
Contributor

@bmcconaghy bmcconaghy left a comment

Choose a reason for hiding this comment

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

Looking good, just want to see the tests broken up a bit to make it clearer what the expected behavior is.

@Bamieh Bamieh requested a review from bmcconaghy June 4, 2019 16:42
@Bamieh
Copy link
Member Author

Bamieh commented Jun 4, 2019

retest

Copy link
Contributor

@bmcconaghy bmcconaghy left a comment

Choose a reason for hiding this comment

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

LGTM

@Bamieh Bamieh added :Stack Services and removed Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Jun 4, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-services

@Bamieh Bamieh added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Jun 4, 2019
@Bamieh Bamieh requested a review from epixa June 4, 2019 16:56
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@Bamieh Bamieh requested a review from mshustov June 5, 2019 15:13
Copy link
Contributor

@mshustov mshustov left a comment

Choose a reason for hiding this comment

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

lgtm on green CI

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@Bamieh Bamieh merged commit abbd6f3 into elastic:master Jun 5, 2019
@Bamieh Bamieh deleted the telemetry-header branch June 5, 2019 18:28
Bamieh added a commit to Bamieh/kibana that referenced this pull request Jul 5, 2019
@mshustov mshustov mentioned this pull request Jun 26, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:elasticsearch Feature:Telemetry Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants