Trace displays curly braces even after the variable's value is replaced

hadleena
Participant III

I have created a proxy where I am using different conditional flows. Each of the flows require different target URL. So, I have used assign message policy for each of the conditional flow to store the path value in a variable in the ProxyEndpoint, like this (I know that we can do this using JS policy at TargetEndpoint as well but just gave this a try!):

<AssignVariable>  
<Name>url</Name>  
<Value>authentication/oauth</Value>  
</AssignVariable>

Then I access this variable in the TargetEndpoint like this:

<HTTPTargetConnection> 
<Properties/>  
<URL>https://sample.com:4567/{url}</URL>  
</HTTPTargetConnection>

When I execute the proxy, the call is successful but when I have a look at the 'Request sent to target server' in trace, I can see that the variable is still present with curly braces along with the replaced value.

4939-ass-var.jpg

Does anyone have any idea as to why the trace still shows the variable within curly braces ({url})along with the replaced value of the variable?

1 8 541
8 REPLIES 8

Not applicable

Looks like a bug to me.

cc @arghya das

I just tried this for myself and it works just fine for me.

I am using a JS policy to set the path variable to a dynamically determined, randomly selected value. And it works.

See attached.

hadlee-dynamic-target-url.zip

To test it, import that proxy to your org+env, deploy it, and then invoke it like this:

curl -i https://ORG-ENV.apigee.net/hadlee-dynamic-target-url/foo 

Do that repeatedly, and you should see different paths for the backend.

You can run a trace to see it actually working as expected. This is in the Apigee Edge SaaS.

Are you running this in the OPDK / Customer-managed Edge? If so, What version of the product are you using?

Oh, wait, maybe you are saying that it works in the runtime, but the Trace display is not accurate. The trace is actually showing the curly braces. Is that the problem?

Yes 🙂 It works fine, but the trace displays the variable name within curly braces!

Please find screen shot attached for you reference.

5056-dino-trace.jpg

I have changed the question's title according to the actual problem.

I tried and I am able to reproduce this issue, its a trace display issue.
I raised EDGEUI-1093 to address the same.

Thanks @Maruti Chand

Hi @Maruti Chand, @Dino,

We faced this issue in the apigee on prem version 4.17.05. Also there is a difference in our case. The trace shows URL like -

https://sample.com:4567/{url}/<dynamic_value_of_the_variable_that_should_be_set>

Although the URL that edge hits is -

https://sample.com:4567/<dynamic_value_of_the_variable_that_should_be_set>

I hope above ticket will fix this issue in that version.

Regards,

Santosh

Not applicable

i have the same problem...