Skip to content

Add a script to retrieve GCP logs to simplify debugging#5814

Merged
marco-c merged 1 commit intomozilla:masterfrom
marco-c:gcplogs
Mar 18, 2026
Merged

Add a script to retrieve GCP logs to simplify debugging#5814
marco-c merged 1 commit intomozilla:masterfrom
marco-c:gcplogs

Conversation

@marco-c
Copy link
Collaborator

@marco-c marco-c commented Mar 18, 2026

This can be used like: python scripts/gcp_logs_retriever.py --start-time 2026-03-17T11:30:00Z --end-time 2026-03-17T15:00:00Z --output gcp-logs.txt

@marco-c marco-c requested a review from suhaibmujahid March 18, 2026 10:27
Copy link
Member

@suhaibmujahid suhaibmujahid left a comment

Choose a reason for hiding this comment

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

Why not using gcloud CLI directly instead, e.g.:

gcloud logging read \
    'resource.labels.namespace_name="bugbug-prod" resource.labels.container_name!="nginx"' \
    --project=moz-fx-webservices-high-prod

@marco-c
Copy link
Collaborator Author

marco-c commented Mar 18, 2026

I'm thinking we could add additional features in the future, for example: given repo and revision, find the logs corresponding to the worker execution that processed them.

@suhaibmujahid
Copy link
Member

LGTM!

@marco-c marco-c merged commit 1da1513 into mozilla:master Mar 18, 2026
6 checks passed
@marco-c marco-c deleted the gcplogs branch March 18, 2026 13:37
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