Skip to content

Add context to Kibana client Send method.#16515

Merged
simitt merged 3 commits intoelastic:masterfrom
simitt:kibana-context
Feb 25, 2020
Merged

Add context to Kibana client Send method.#16515
simitt merged 3 commits intoelastic:masterfrom
simitt:kibana-context

Conversation

@simitt
Copy link
Copy Markdown
Contributor

@simitt simitt commented Feb 24, 2020

What does this PR do?

This allows passing in context for http requests made to Kibana.
Requirement for elastic/apm-server#3185

This PR supersedes #16427. It only adds minimal required changes to avoid vendoring the apm library without a real usecase for other beats.

Why is it important?

APM Server uses the Kibana client for regular queries and wants to add instrumentation to the requests for more insights. Proper context passing is a requirement for instrumenting the requests.

Checklist

  • My code follows the style guidelines of this project
    - [ ] I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made corresponding change to the default configuration files
    - [ ] I have added tests that prove my fix is effective or that my feature works

How to test this PR locally

The changes of this PR are part of elastic/apm-server#3359, where it is shown how this can be tested in combination with APM Server.

Related issues

APM Server Issue # elastic/apm-server#3185

This allows passing in context for http requests made to Kibana.
Requirement for elastic/apm-server#3185
@urso
Copy link
Copy Markdown

urso commented Feb 24, 2020

Maybe it is better to introduce a RequestWithContext and SendWithContext method. This way the package API stays backwards compatible.

@simitt
Copy link
Copy Markdown
Contributor Author

simitt commented Feb 25, 2020

Merging this in as failing tests are unrelated.

@simitt simitt merged commit 9c8d5c7 into elastic:master Feb 25, 2020
simitt added a commit to simitt/beats that referenced this pull request Feb 25, 2020
This allows passing in context for http requests made to Kibana.
Requirement for elastic/apm-server#3185
simitt added a commit that referenced this pull request Feb 25, 2020
This allows passing in context for http requests made to Kibana.
Requirement for elastic/apm-server#3185
@simitt simitt deleted the kibana-context branch July 16, 2021 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants