Stay organized with collections
Save and categorize content based on your preferences.
You can route pipeline logs to a Cloud Pub/Sub sink to build an event-driven architecture. You can also sync pipeline logs into your observability tools. For more information about routing logs to a Cloud Pub/Sub sink, see View logs routed to Pub/Sub.
This section describes how you can create a Pub/Sub topic, route (or sink) pipeline job logs to the Pub/Sub topic, and verify the logs published to the Pub/Sub topic. You can then subscribe downstream applications to the Pub/Sub topic to power event-driven architectures, or sync pipeline logs with your observability tools in near real-time.
Use the following instructions to set up a Pub/Sub sink and view the logs routed to it on the Google Cloud console:
On the Subscriptions page of the Google Cloud console, create a pull subscription for the Pub/Sub topic. For more information, see Create pull subscription.
Select Logging from the navigation menu, then click Go to Log Router:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Route logs to a Cloud Pub/Sub sink\n\nYou can route pipeline logs to a Cloud Pub/Sub sink to build an event-driven architecture. You can also sync pipeline logs into your observability tools. For more information about routing logs to a Cloud Pub/Sub sink, see [View logs routed to Pub/Sub](/logging/docs/export/pubsub).\n\nThis section describes how you can create a Pub/Sub topic, route (or sink) pipeline job logs to the Pub/Sub topic, and verify the logs published to the Pub/Sub topic. You can then subscribe downstream applications to the Pub/Sub topic to power event-driven architectures, or sync pipeline logs with your observability tools in near real-time.\n\nUse the following instructions to set up a Pub/Sub sink and view the logs routed to it on the Google Cloud console:\n\n1. Create a Pub/Sub topic. For more information, see [Create a topic in the Cloud Pub/Sub documentation](/pubsub/docs/create-topic#create_a_topic).\n\n2. On the **Subscriptions** page of the Google Cloud console, create a pull subscription for the Pub/Sub topic. For more information, see [Create pull subscription](/pubsub/docs/create-subscription#create_a_pull_subscription).\n\n3. Select **Logging** from the navigation menu, then click **Go to Log Router** : \n\n [Go to Log Router](https://console.cloud.google.com/logs/router)\n4. In your project containing the logs you want to route, click **Create Sink**.\n\n5. Enter a name and description for the sink, and then click **Next**.\n\n6. In the **Service** list, select **Cloud Pub/Sub topic**.\n\n7. In the **Destination** list, select the Pub/Sub topic that you created, and then click **Next**.\n\n8. Under **Choose logs to include in sink**, specify the following inclusion filter:\n\n resource.type=\"aiplatform.googleapis.com/PipelineJob\"\n\n9. Click **Create Sink**.\n\n10. On the **Subscriptions** page, click the subscription ID.\n\n [Go to Subscriptions page](https://console.cloud.google.com/cloudpubsub/subscription/list)\n11. Click the subcription ID that you created.\n\n12. On the subscription details page, click the **Messages** tab.\n\n13. To pull and view the pipeline job logs, click **Pull**."]]