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

log sink query another gcp project logs

Hi there,

I'm encounter a problem. Essentially, i would like to use log sink (in "pipeline project")collecting logs match in "raw data project" to destination a pub/sub topic (in "pipeline project") then to trigger Workflows execution (in "pipeline project"). However, it's not showing any logs in "pipeline project" from "raw data project". I've given correct data time range.  (it shows logs in "raw data project")

I've assigned pub/sub publisher and workflows invoker roles to the service account i created and added in "raw data project". The log sink and destination to a Pub/Sub topic in "pipeline project" won't directly allow me to view the logs from "raw data project" in the Log Explorer of "pipeline project". The same log query works in "raw data project" but not in "pipeline project".

Here's the log query i'm using in "pipeline project" trying to query logs from "raw-data-project" but not showing anything (I've given corrector date time range) Why is that and what should i do?

 

 

resource.type="bigquery_dataset"
resource.labels.dataset_id="analytics_xxxxxxx"
resource.labels.project_id="raw-data-project"
protoPayload.metadata.tableCreation.reason="JOB"
protoPayload.authenticationInfo.principalEmail="test@system.gserviceaccount.com"
protoPayload.methodName="google.cloud.bigquery.v2.JobService.InsertJob"
protoPayload.resourceName:"tables/events_"
NOT
protoPayload.resourceName:"tables/events_intraday"

 

 

 

 

Solved Solved
0 1 461
1 ACCEPTED SOLUTION

you could set the "raw data project" log sink destination to cross-project pub/sub topic of "pipeline project". I guess i'll assign pubsub publisher role to service account of "raw data project" in "pipeline project"

sysph_0-1688652620983.png

 

View solution in original post

1 REPLY 1

you could set the "raw data project" log sink destination to cross-project pub/sub topic of "pipeline project". I guess i'll assign pubsub publisher role to service account of "raw data project" in "pipeline project"

sysph_0-1688652620983.png

 

Top Solution Authors