Set up Azure API Management Service logging

Created:
November 7, 2023
Updated:
April 5, 2024

To be able to set up the Azure logging integration you must have an Azure API management service set up. In the integration process an API management service is deployed with your APIs added to it. Policies are then added to the API management service.

Following the steps below will allow you to fill out the template and will deploy all the required resources to set up the integration.

1. Select the API management Service from the dropdown.

2. Create an App token and copy it for later use.

3. Click Deploy to Azure. This will open up a template which will deploy all the required resources to set up the logging.

4. Select a Resource Group from the dropdown. This needs to be the same resource group as your API gateway service. When you select the resource group the region is populated. 

5. The app name is pre-filled, but can be edited if required

6. Select the App Service Plan from the dropdown.Click here to view what the service plans are.  

7. Enter an Event Hub Namespace Name, this name must be unique.

8. In the Apim Service Name field enter the name of the Azure API Management service. The name can be located in the API management services page.

9. Copy the FireTail app token that you generated in step 2. Paste into the FireTail App Token field.

10. Click NextCreate.

This will initiate the deployment. The deployment may take a couple of minutes to be completed. When it is done you can then add the policy.

Add policy

1. In the FireTail platform, copy the policy in the integration setup.

2. Go to the Azure API management services page. Select the API management service the integration is being applied to. Select APIs from the left menu.

3. Apply the policy. You can add the policy globally, to a specific API, or to a specific operation.

  • To apply the policy globally:
    • Click All APIs. In the Inbound processing section, click the code editor symbol (</>).
    •   Remove the existing policy and paste the FireTail policy into the code editor.
    •   Note: The base element must be removed from the policy when it is applied to all APIs.
  • To apply the policy to an API:
    • Click the required API. In the Inbound processing section, click the code editor symbol (</>).
    • Remove the existing policy and paste the FireTail policy into the code editor.
  • To apply the policy to an operation:
    • Click the required API. In the Inbound processing section, click the code editor symbol (</>).
    •  Remove the existing policy and paste the FireTail policy into the code editor.

4. Click Save.

When the deployment is complete and the policies added, you will get logs for the relevant APIs in the FireTail platform.