-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[inspector] show request method, path, and querystring #169970
[inspector] show request method, path, and querystring #169970
Conversation
89fd4c8
to
3296dda
Compare
…-ref HEAD~1..HEAD --fix'
60e9b2e
to
b3ac7d2
Compare
@elasticmachine merge upstream |
Pinging @elastic/kibana-presentation (Team:Presentation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally with Safari 👍 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to inspector LGTM! Code only review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a huge improvement! Spent some time playing around with it and this will be super helpful in narrowing down issues related to search. Just had one comment, more of a discussion rather than feedback.
@@ -134,6 +139,9 @@ export const enhancedEsSearchStrategyProvider = ( | |||
const response = esResponse.body as estypes.SearchResponse<any>; | |||
return { | |||
rawResponse: shimHitsTotal(response, options), | |||
...(esResponse.meta?.request?.params | |||
? { requestParams: sanitizeRequestParams(esResponse.meta?.request?.params) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes we always want the request params being sent in the response - this will cause inflated responses most of the time even in cases where it's not used (e.g. the response from a GET request after the search has already been submitted). Can we make this so the behavior is opt-in, or at least remove these parameters from cases where the client should already have the request parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would this look? Would consumers of SearchSource pass in an option to turn-on request parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated server side logic to avoid returning requestParams for async polling requests 3f1bc36
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Closes #45931
PR updates data plugin
search
andbsearch
endpoints to return method, path, and querystring request params from elasticsearch-js client requests. This provides inspector with the exact details used to fetch data from elasticsearch, ensuring inspector displays request exactly as used by elasticsearch-js client.ESQL This PR makes it possible to open ESQL searches in console.
background
If you are thinking to yourself, "haven't I reviewed this before?", you are right. This functionality has been through several iterations.
headers
.kibana_utils/server/report_server_error.ts
, which is used extensively throughout Kibana.