Posts

gcp getting started with LQL

Image
When working with GCP LQL, we need to work with fields and the log query language itself. To identify what fields that is available we can always check it here. There are the field that is available for us to query. If you expand that, you can discover more fields. Next we can also use SEARCH to all a full search (non case sensitive) of all the fields for example. This will retrieve log entry that contains "simple" or "Simple". SEARCH ( "Simple" ) gcloud logging write my - test - log "A simple entry." gcloud logging write my - test - log "A simple entry. There are the operator that you can use to refine your query with fields We can also write to our log using gclod command.  gcloud logging write my-test-log "A simple entry." Quick Summary Cheat Sheet Goal Operator / Syntax Example Starts with ( abc* ) =~ "^abc.*" protoPayload.methodName =~ "^v1.instances.*" Ends with ( *xyz ) =~ ".*xyz$" htt...