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

apigee x loging to pubsub and google cloud logging

Hi there,

I'm new to Apigee X, coming from Apigee Edge, and I have a question regarding logging.

quest1: What is currently the best approach for logging in Apigee X when using only service accounts and including them during proxy deployment?

I’ve seen options like using the MessageLogging extension for Cloud Logging and the PublishMessage policy for Pub/Sub. On the other hand, I’ve also seen examples where FlowCallout is used with manual service account authentication — like in this GitHub example: github.com/g-lalevee/Apigee-GCP-Services.

Is there still any reason today not to use extensions?

What’s the best and easiest way to handle logging — especially with CI/CD in mind?

quest2:  I cannot use publishMessage policy to publish to Pub/Sub in the postClientFlow. Is it possible to use it via a shared flow in the postClientFlow, or is this not possible?

Thanks in advance for your insights!

Solved Solved
0 5 220
2 ACCEPTED SOLUTIONS

@alazam - Check out this sample (and other) on Cloud Logging. 
Reg PublishMessage policy in Postclientflow (am still checking) but ServiceCallout is supported.You can make a direct Pub/Sub API call in that policy (not elegant but surely works)

View solution in original post

hello @alazam 

Now, Apigee X/hybrid simplifies Service Account authentication for accessing GCP services compared to Apigee Edge. This task, which might have previously required solutions like the mentioned GitHub sample (compatible with Edge and X), is now managed more easily by Apigee X/hybrid itself.

 

View solution in original post

5 REPLIES 5

Hello @alazam ,

We saw your question and wanted to let you know we’re keeping it on our radar. We’ll also invite others in the community to pitch in and share their thoughts.

@alazam - Check out this sample (and other) on Cloud Logging. 
Reg PublishMessage policy in Postclientflow (am still checking) but ServiceCallout is supported.You can make a direct Pub/Sub API call in that policy (not elegant but surely works)

thank you for your help

hello @alazam 

Now, Apigee X/hybrid simplifies Service Account authentication for accessing GCP services compared to Apigee Edge. This task, which might have previously required solutions like the mentioned GitHub sample (compatible with Edge and X), is now managed more easily by Apigee X/hybrid itself.

 

thats clear, appreciate it!