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

Disable start request logs for get request #171

Merged
merged 4 commits into from
Dec 4, 2023

Conversation

hiteshk25
Copy link
Collaborator

Disabling the start log for /get request. Initially we added this log debugging select request. Thus just keeping that log for select request only.

This reduces almost 33% of log lines as we make many get requests.

.asShallowMap(false)
.put(
"params", "{" + filteredParams + "}"); // replace "params" with the filtered version
} else {

Choose a reason for hiding this comment

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

I'm wondering if instead of wrapping this in a check that the request is a "select" request, we should instead:

  1. Change this else to be else if (isDistrib(req)) to only log on distrib requests
  2. Change the log level for these to debug so they don't log by default but we could enable if needed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Today, we log Start External Search Query on query aggregator node, when alexa-request hits to QA node. Then we log Start Forwarded Search Query on data node for each sub-shard request. Thus both if-else are relevant in context of select request.

if we want debug-logging for get request then need to find some other place as RealTimeGetHandler extends the SearchHandler.

Let me know if this looks reasonable

Choose a reason for hiding this comment

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

My thinking is that we'd generally want this logged for any distributed query, where gets are non-distributed queries. That's why I think instead of just looking for the path contains "select" we could just change the else to isDistrib(req) and then this wouldn't log for any non-distributed requests, including gets.

The debug is totally optional, was thinking debug if we find we don't need these much in general.

Copy link

@justinrsweeney justinrsweeney left a comment

Choose a reason for hiding this comment

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

LGTM

@justinrsweeney
Copy link

Should we merge this into fs/branch_9x instead of branch_9_3?

@hiteshk25 hiteshk25 merged commit 6812c80 into fs/branch_9_3 Dec 4, 2023
3 checks passed
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.

2 participants