For Apigee Hybrid, does Message Logging (Cloud Logging element) policy need the logger related pods to be running to be able to push the API logs to GCP?. We have currently set logger to false in our overrides and set up the cluster in AKS and want API logs to be available in GCP Cloud logging.
also we have used a shared flow with a service account mapped to push the logs
Solved! Go to Solution.
I'm not sure if there is any way to catch exceptions thrown by Message Logging policy when it fails to connect to the target logging service. Perhaps there is a way to debug this further but nothing obvious to me at the moment.
One other idea that comes to mind is to test your configuration (e.g. payload, service account credentials, etc) by invoking the Cloud Logging API directly. You could first start by doing this locally (i.e. via cURL) to make sure your parameters and credentials work as expected. Then, if that works, you could set up a Service Callout to do the same, using those same exact parameters. You can of course debug the Service Callout easier. This was the recommended way before Apigee added support for Cloud Logging natively in the MessageLogging policy. An example of the older approach using Service Callout can be found here.
If those both work as expected, I would then compare to the configuration you have for the CloudLogging element in your MessageLogging policy and make sure everything is the same.