How to install the Add Request ID integration through Azion Marketplace

The Azion Add Request ID integration enables you to add an additional header in the incoming request object, assigning a unique identifier to each HTTP request attended by Azion Edge Platform.

This identifier facilitates you in tracking and identifying individual requests, as well as allows you to analyze logs and identify issues. This way, you can cross-reference data from observability products, such as Azion Data Stream and Real-Time Events, with the internal logs of your infrastructure.


Getting the integration

To install Azion Add Request ID:

  1. Access Azion Console > Marketplace.
  2. On the Marketplace’s homepage, select the integration’s card.
  3. Once the integration page opens, click the Install button.

A success message appears to confirm that your integration is installed.


Configuring the integration

Setting up an edge firewall

To do so, follow the steps:

  1. On the upper-left corner, select Products menu > Edge Firewall in the Secure section.
  2. Click the + Edge Firewall button.
  3. Give an easy-to-remember name to your edge firewall.
  4. Select the domains you want to protect with the function.
  5. Enable the Edge Functions switch in the Modules section.
  6. Click the Save button.

Done. Now you’ve instantiated the edge firewall for your integration and it has access to edge functions.

Setting up the function

While still on the Edge Firewall page:

  1. Select the Functions Instances tab.
  2. Click the + Function Instance button.
  3. Choose an easy-to-remember name for your function.
  4. On the dropdown menu, select the Add Request ID function.
    • This action will load the Arguments tab.

In this case, the Add Request ID function can be used without any arguments. However, it has a single optional argument that can be used to modify the name of the header where the Request ID will be inserted.

JSON Args keyEnvironment Variable NameData TypeDefault ValueDescription
header_nameAZION_REQUEST_ID_HEADER_NAMEStringx-azn-request-idThe name of the header where the function will insert the Request ID. If the argument isn’t a non-empty string, then the function will use the default value
  1. When you’re done, click the Save button.

Setting up the Rules Engine

To finish, you have to set up a Rules Engine to configure the criteria and the behavior to run the function.

Still in the Edge Firewall page:

  1. Select the Rules Engine tab.
  2. Click the + Rule Engine button.
  3. Give an easy-to-remember name to the rule.
    • You can add a description, but it’s an optional step.
  4. Select a criteria to run and catch the domains that you want to run the integration on. Example: if Hostname is equal xxxxxxxxxxxx.map.azionedge.net.
  5. Below, select a behavior Run Function.
  6. Select the adequate function according to the name you gave it in the previous step.
  7. Click the Save button.

Done. You’ve now configured the Add Request ID integration and will start receiving the header.


Contributors