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

Add Python PubSub pipeline for processing gcloud logs #10

Merged
merged 4 commits into from
Dec 12, 2023

Conversation

Amar3tto
Copy link
Contributor

@Amar3tto Amar3tto commented Nov 10, 2023

Pipeline added: Google Cloud log processing with Apache Beam and Dataflow
IO: PubSub IO
SDK Language: Python
Screenshot from 2023-11-10 13-46-57
Run instruction:

  • Create PubSub topics: input, output and DLQ.
  • Go to Log Router and route logs to the input PubSub topic (e.g. only logs for BigQuery).
  • run python gcloud_logs_filter_with_dlq.py --runner="DataflowRunner" --project="your-project" --region="your-region" --input_topic="your-input-topic" --output_topic="your-output-topic" --dlq_topic="your-dlq-topic".
  • Perform some actions (e.g. create/delete BigQuery table) so the logs will be routed to the input topic.
  • Check output PubSub topic.

Copy link

@olehborysevych olehborysevych left a comment

Choose a reason for hiding this comment

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

LGTM except minor comment

@olehborysevych
Copy link

WE will also need to provide a better PR description before sending for external review.

@Amar3tto Amar3tto marked this pull request as ready for review November 30, 2023 18:54
Python/pubsub/gcloud_logs_filter_with_dlq.py Outdated Show resolved Hide resolved
Python/pubsub/gcloud_logs_filter_with_dlq.py Outdated Show resolved Hide resolved
Copy link

@johnjcasey johnjcasey left a comment

Choose a reason for hiding this comment

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

LGTM

@liferoad liferoad merged commit 095fc26 into GoogleCloudPlatform:main Dec 12, 2023
2 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.

4 participants