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

Mention query time and optimization when using list_entries in the docs #68

Closed
Mapiarz opened this issue Oct 13, 2020 · 2 comments
Closed
Assignees
Labels
api: logging Issues related to the googleapis/python-logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: docs Improvement to the documentation for an API.

Comments

@Mapiarz
Copy link

Mapiarz commented Oct 13, 2020

Hi.

The library docs explain how to retrieve and query for logs using list_entries methods, simple enough. Nonetheless, I was quite puzzled today as to why my queries, even though very simple, take minutes to get the response from the API. After quite a lot of googling and digging deep into Logging docs, I was able to find an answer: https://cloud.google.com/logging/docs/view/advanced-queries#finding-quickly

The reason why my queries took so long to execute is because I didn't limit the time period of my queries. This can be very confusing for newcomers and I think the docs could use a paragraph about query time and that most queries should be limited by time period (like they are, for instance, in the Google Cloud Platform web logs browser) or that if not limited by time period they can take a lot of time to execute.

Regards,
Bartosz

@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/python-logging API. label Oct 13, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Oct 14, 2020
@Mapiarz Mapiarz mentioned this issue Oct 15, 2020
@daniel-sanche
Copy link
Contributor

Sorry I missed this one! I'm working on changes to list_entries to add sensible defaults. Soon, it will by default only show logs for the last 24 hours unless otherwise specified, like gcloud logging read.

But I agree we should document this feature better. Do you have any suggestions about where this should be mentioned? Maybe the Quickstart?

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Oct 18, 2020
@keenan-devrel keenan-devrel added type: docs Improvement to the documentation for an API. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Oct 23, 2020
@daniel-sanche
Copy link
Contributor

I'm going to close this because #73 removes the root issue (long queries without time bounds). I'll re-evaluate the docs later to see if we can improve things there as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/python-logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

No branches or pull requests

4 participants