Hi All,
We are encountering an issue in our Apigee Edge OPDK setup where some policies are intermittently visible in the trace session. At times, these policies appear, but other times they do not. This inconsistency is puzzling and affecting our operations.
For example, we are using a Service Callout to make a call to a service. However, the Service Callout response is not showing in the trace. To troubleshoot, we added a JavaScript policy immediately after the Service Callout to print the response. Unfortunately, the trace does not display the JavaScript policy, and no output is printed. Instead, all JavaScript-related properties are being added to the Service Callout properties. Please refer to the snapshots below for a clearer understanding of the issue.
Snapshot 1: In the code, there’s no condition to skip the JS execution.
Snapshot 2: As shown below, JavaScript is not being executed after the Service Callout; all JavaScript-related properties are being added to the Service Callout properties.
A similar issue is noticed in another situation. We have flow hooks configured, and in the pre-proxy flow hook, we determine the auth type for the client and then authenticate the client based on the auth type. The last step is to verify the API key. This last step is sometimes executed and visible in trace, but other times it is not. FYI, there's no condition for the execution of this step. Since flow hooks have the common code, it should show the issue in other proxies too, but it doesn't. Below are some snapshots for your reference.
Snapshot 1: No API key validation is happening.
Snapshot 2: API key validation happened.
In the above two snapshots, the time difference between the two requests is just a few seconds. There's no condition for the execution of this step, and no code was modified.
Please let us know if you have faced similar issues and what the resolution was.
@dchiesa1 Please help!
Thanks in advance!