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. Enable the Edge Functions switch in the Modules section.
  5. 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 a name to the rule.
  4. Select a criteria to run and catch the domains that you want to run the integration on.
  • Example: if Host matches yourdomain.com.
  1. Below, select a behavior to the criteria. In this case, it’ll be Run Function.
    • Select the adequate function according to the name you gave it during the instantiation step.
  2. Click the Save button.

On the Console, you must now configure your domain so your edge firewall protects it.

  1. On the Products menu, select Domains.
  2. Click on the domain you want to protect with your Add Request ID function.
  3. In the Settings section, click on the Edge Firewall selector and choose the edge firewall you created.
  4. Click the Save button.

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


Contributors