Adding a Unique Call ID for Tracing
APImetrics stores all call results and identifies outliers for rapid fault resolution purposes. To support this further, you can add a unique identifier to each instance of a call to make it easier to find in other systems and tools.
1. Define a header variable that can be ignored
We would typically suggest something simple in the header like X-trace or similar that can be ignored by your backend, but give you something to search for you in your results.
2. Add the System Variable Result_ID
In the Header Parameters add:
x_trace = %%RESULT_ID%%
All calls will then be 'watermarked' with a unique ID number.
You can see that when you edit the Header and put the %%RESULT_ID%% in the preview pane shows this as the API call that will be made.
3. Finding the Result_ID
When you now look at a result, you will see the unique identifier in the HTTP call data. The identifier will appear in the gateway logs as part of the call data and so can be searched for with API gateway log tools.
Updated almost 4 years ago