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

[skip-ci] [POC] Use x-opaque-id to associate search request with user/saved object #41530

Closed
wants to merge 2 commits into from

Conversation

lukasolson
Copy link
Member

@lukasolson lukasolson commented Jul 18, 2019

Summary

Associates a request with a given user/saved object using the X-Opaque-Id. This will be useful for admins to troubleshoot where requests are coming from using the Elasticsearch task management APIs.

Addresses #16493.

Currently the format of the header isusername:saved_object_type:saved_object_id, but this is open to discussion:

Untitled

This is only a proof of concept, and currently only works in Discover, and you have to add the following in your kibana.yml:

elasticsearch.requestHeadersWhitelist: ["authorization", "X-Opaque-Id"]

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@lukasolson lukasolson added Feature:Search Querying infrastructure in Kibana Team:AppArch labels Jul 18, 2019
@lukasolson lukasolson self-assigned this Jul 18, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@kobelb
Copy link
Contributor

kobelb commented Jul 18, 2019

Whenever I've thought about adding something along these lines before, I've generally thought about it from the perspective of wanting to trace a single HTTP request to a Kibana API to the resultant calls to Elasticsearch, though I see merit in both approaches.

Once everything is switched to the NP, it's theoretically possible to use the request interceptors to add a header to every request that includes the URL (including the hash) that initiated the XHR. If we weren't using hash based routing this would already be available in the Referer request header.

(Apologies for the unsolicited feedback)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Search Querying infrastructure in Kibana
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants