context.Operation.UrlTemplate - variable value not rendered in tracing. How to see the rendered value of urltemplate?

Martin Kal 20 Reputation points
2024-07-01T12:35:54.3666667+00:00

I have an api to httpbin.org/anything with frontend as a URL template (see screenshot)
User's image

I have a policy which reference the builtint context as below as well as a variable with a static value

    <inbound>
        <base />
        <set-variable name="anything" value="@(context.Operation.UrlTemplate)" />
        <set-variable name="something" value="hello" />
    </inbound>

When I trace the call, the rendered value of urltemplate doesn't show up in trace. It just shows {anything}
The value gets rendered correctly. Just that the trace doesnt shows the rendered variable value.
Is there a way in APIM tracing to show the rendered value of a uri template variable?

User's image

User's image

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,908 questions
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 23,256 Reputation points
    2024-07-02T04:28:04.4633333+00:00

    @Martin Kal Thanks for reaching out. In APIM, the tracing feature does not directly show the rendered value of a URL template variable. It shows the template itself, as you’ve observed with {anything}

    please feel free to leave your feedback at aka.ms/apimwish. do let me know incase of further queries, I would be happy to assist you.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful