Transaction ID

The Transaction ID interceptor generates a unique identifier for all transactions occurring in APIS registered on the Manager. This unique identifier will be added to the Trace information, so as to provide greater control and individuality to the call.

How it works

When we make a call with the Transaction ID interceptor, the Gateway checks whether a value has been passed in the header or query param. If so, the Gateway populates the Trace with the information passed; otherwise, the Gateway itself generates a UUID (universally unique identifier) and it is informed on the Trace.

Configuring the interceptor

The interceptor can be inserted in the request flow only.

transaction id interceptor

To configure it, you must indicate the location of the ID in the request and the name used to inform the vale.

The ID can be informed in the header or query param. It’s through the name inserted in the configuration window that the interceptor will identify the ID value and exhibit it on the Trace.

In the example below, we are configuring a ID to be sent in the header with the name transaction-id.

transaction id modal
There can only be one Transaction ID interceptor per request flow. The system will block the insertion of a second interceptor.

Example of use

To illustrate how this interceptor is to be used in a request, let’s imagine a scenario in which a call is made to the resource /saldoEstoque of a given API (a resource containing information on product storage). Imagine as well that the API has a Transaction ID interceptor inserted in the request flow of the resource mentioned, configuring an ID to be passed in the header with the name transaction-id. The value of this ID is 1f7e240b-e7fb-4e77-bafd-028affd673ac, as shown in the image below.

transaction id call

After the call is completed, we can check the its information on the Trace log and see that the ID value is displayed (inside the red box in the image below).

transaction id trace

In the image above, we can check that the "Request ID" is provided as additional information (inside the blue box). It is a UUID for each requisition. That is, it is generated at each request and does not need to be informed in the request itself. In turn, the "Transaction ID" is only changed if a new value is passed in the call, in order to differentiate the transaction.

Thanks for your feedback!
EDIT

Share your suggestions with us!
Click here and then [+ Submit idea]