Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to get the google logs and their associated trace using only the "gcloud logging read"

Hi Community

I am trying to get the Google Logs and their associated Trace Logs using the CLI/API.

When I use the Log Explorer I can see them both, but the CLI only returns the Logs (no Trace Logs).

Is it possible to get both programmatically in a simple way?

Or

I have to use additional queries using the spanid?

Thanks

Solved Solved
0 1 654
1 ACCEPTED SOLUTION

Hi @ggaure,

Welcome to Google Cloud Community!

This document offers suggested queries to help you easily find important logs, with the following sections organizing queries by Google Cloud services. While this gcloud logging read documentation helps you read log entries.

You can also refer to these documentations, which might help for future reference.

If you need further assistance, you can reach out to Google Cloud Support at any time.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

View solution in original post

1 REPLY 1

Hi @ggaure,

Welcome to Google Cloud Community!

This document offers suggested queries to help you easily find important logs, with the following sections organizing queries by Google Cloud services. While this gcloud logging read documentation helps you read log entries.

You can also refer to these documentations, which might help for future reference.

If you need further assistance, you can reach out to Google Cloud Support at any time.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.