In Log Explorer, run the following query for the last 30 days got 51 entries.
Hi @waynez,
Welcome to Google Cloud Community!
It seems like you are experiencing inconsistencies in log retrieval between your Log Explorer and your Python client code using the Cloud Logging API.
In your Log Explorer query, It uses a very specific filter targeting CreateCluster
operations in a particular region and project. Also, your python code uses a broader filter resource.type="cloud_dataproc_cluster"
which will include all Dataproc cluster-related log entries, not just CreateCluster operations.
To isolate the issue, here’s the workaround that you can perform on your end:
start_time
and end_time
parameters in the list_entries
method.You should be able to reconcile the log entries between your Log Explorer and python client by carefully aligning your filters and time ranges.
I hope the above information is helpful.