Datadog — Azure API Management logs

Raphael Yoshiga
ITNEXT
Published in
3 min readNov 7, 2020

--

Source

Azure resources generally have good integration with App Insights for logs and APM (Application performance monitoring). But sometimes your monitoring stack is with a 3rd Party company, like New Relic, Zabbix or Datadog.

In this guide, we are going to how to log every single request hitting an Azure API management into Datadog.

What is Datadog?

Datadog is a monitoring service for cloud-scale applications, providing monitoring of servers, databases, tools, and services, through a SaaS-based data analytics platform. [Wikipedia]

Logging from API Management

The base documentation where I learned this logging flow.

The steps

This integration requires a few components, so let’s go over configuring this manually:

* Make sure you are adding the resources to the same region

1. Add the event hub namespace

Create Event hub namespace Azure page

2. Create the event hub in the namespace:

Create Event hub Azure page

3. Enable the diagnostic logging:

Azure seems to be moving towards this model, where every resource is going to expose diagnostic settings, so this tutorial could be used for other resource types to have Datadog integration.

Enable diagnostic in the API management
Enable diagnostic settings for log “GatewayLogs” into the event hub we created

So up to this point, we have half the integration:

4. Create the Function app:

--

--

Writer for

CEO at FCamara UK. TDD evangelist with over 14 years of experience in developing scalable software.