Search code examples
google-cloud-platformgoogle-cloud-composergoogle-cloud-logging

How can I find the logs of my Cloud Composer DAG in Cloud Logging?


I know this is a simple question but I find having to figure it out every time, so:

What query should I use in Cloud Logging to quickly find the logs of the DAG that I ran in Cloud Composer?


Solution

  • You can run the following query in Cloud Logging to quickly find the logs of your Cloud Composer DAG:

    resource.type="cloud_composer_environment"
    resource.labels.environment_name="name_of_the_env_you_created_in_cloud_composer"
    labels.workflow="name_of_your_dag"
    

    If you want you could leave the environment name out and just use:

    resource.type="cloud_composer_environment"
    labels.workflow="name_of_your_dag"