Extension Policy is not allowed in PostClientFlow(StackDriver)

APR
Participant I

I have a use case where I need to send logs to stack driver (GCP logger) from Edge proxy(SAAS)

Currently, I seeing a deployment error if I configured the policy in PostClientFlow. However, the policy is working fine in other flows and able to send logs to Strackdriver.

I'm wondering why it's not working in postClientFlow, though Apigee docs say it's supported in PostClientFlow.

steps:

  • configured the stack driver Extention at the environment (Extension version1.5.0)
  • in the Extention policy, configured the <Connector>test</Connector> <Action>log</Action>
  • configured the PostClientFlow

Please let me know if extension are supported in PostClientFlow or missing any configure here.

Thanks and Stay Safe

0 3 145
3 REPLIES 3

I'm wondering why it's not working in postClientFlow, though Apigee docs say it's supported in PostClientFlow.

The documentation I see for postclientflow is here. It says only MessageLogging is supported on PostClientFlow.

10834-screenshot-20210302-135959.png

I think this is incorrect. Actually I think you can use ServiceCallout as well.

Maybe you have a different version of Apigee?

What I suggest is: avoid the use of the Extension policy for sending data to Stackdriver. Just use the Rest API with a ServiceCallout. It's simpler. You need a Service Account key, and you need to use that key to get an OAuth Bearer token, that you must insert as a header in the ServiceCallout. For getting the required token, you can follow this:

https://github.com/DinoChiesa/Apigee-GCS-Get/tree/main/sharedflows/get-googleapis-token/sharedflowbu...

I appreciate your quick turnaround on the issue and I welcome your inputs

I'm just checking different solutions to send data to stack driver since I Apigee supporting Stackdriver extentions then thought it would be good idea to leverage functionality.

Here is what the document says:

you want to use the ExtensionCallout policy to call the Google Cloud Logging extension from a PostClientFlow, ensure that the features.allowExtensionsInPostClientFlow flag is set to true in your organization.

And doc is saying for cloud customers it will enable by default but it is not in our case.

Please refer the extention policy link :

https://docs.apigee.com/api-platform/reference/policies/extension-callout-policy#:~:text=Note%3A%20A....

I see!
you may have to contact Apigee support to get this straightened out.