Azure Monitor’s metrics are a critical source of truth for your cloud infrastructure, but without context, they’re just numbers. Dynatrace, on the other hand, excels at providing that context, automatically tracing requests across services and pinpointing root causes. Connecting them means you get the best of both worlds: the breadth of Azure’s platform-level metrics combined with Dynatrace’s deep, end-to-end application performance insights.
Let’s see this in action. Imagine a user reports a slow experience on your e-commerce site. In Dynatrace, you’d see a "slowdown" event. Clicking into it, you’d see a waterfall of transactions, highlighting a specific Java service call taking too long. But why is that service slow? Is it under-resourced? Is the database struggling? This is where Azure Monitor metrics become indispensable.
Here’s a typical Dynatrace PurePath showing a slowdown in a checkout-service:
Transaction: Checkout - Place Order
- User Action: Clicked "Place Order"
- Browser: Chrome (Windows)
- Network Latency: 50ms
- Web Request: POST /api/v1/orders
- Server: app-server-01 (VM Scale Set)
- Processing Time: 2500ms
- Java Method: com.example.OrderService.processPayment(long) - 1200ms
- Database Call: SELECT * FROM products WHERE id = ? - 800ms
- External API Call: POST https://payment.gateway.com/charge - 500ms
Now, you suspect app-server-01 is the bottleneck. You switch to Azure Monitor, filtering by your checkout-service resource group and the app-server-01 VM. You’d look at metrics like CPU Percentage and Memory Available MBytes. If CPU Percentage is consistently above 90% and Memory Available MBytes is critically low, you’ve found your culprit.
This integration isn’t just about seeing metrics; it’s about correlating them. Dynatrace’s topology viewer will show app-server-01 as a host. By clicking on it, you can access a pre-configured dashboard showing key Azure Monitor metrics alongside the Dynatrace-collected host metrics (like CPU, memory, disk I/O, network). This allows you to immediately see if an Azure platform metric (like a spike in disk queue length) aligns with a Dynatrace-detected performance degradation in a specific process.
The core mechanism for this connection is Azure’s Diagnostic Settings. You configure your Azure resources (like Virtual Machines, App Services, AKS clusters) to send their metrics and logs to a destination that Dynatrace can ingest. The most common destinations are:
- Azure Event Hubs: This is the preferred method for streaming near real-time data. Dynatrace has a dedicated Azure Event Hubs integration.
- Azure Log Analytics Workspace: Dynatrace can query Log Analytics Workspaces directly to pull metrics and logs.
Let’s say you want to send metrics from a specific Virtual Machine to Dynatrace via Event Hubs.
Configuration Steps:
-
Create an Azure Event Hub Namespace and an Event Hub:
- In the Azure portal, navigate to "Event Hubs".
- Click "Create".
- Select your subscription, resource group, and give it a name (e.g.,
dynatrace-events). - Choose a region.
- Under "Review + create", click "Create".
- Once the namespace is deployed, go to it and click "+ Event Hub".
- Name your event hub (e.g.,
azure-metrics). - Click "Create".
-
Configure Diagnostic Settings on your Azure Resource:
- Navigate to your Azure Virtual Machine (or other resource).
- Under "Monitoring", click "Diagnostic settings".
- Click "Add diagnostic setting".
- Give it a name (e.g.,
send-to-dynatrace). - Under "Logs", select the logs you want to send. For metrics, you’ll typically want
AzureMetrics. - Under "Metrics", select "Send to Event Hub".
- Select the Event Hubs Namespace (
dynatrace-events) and Event Hub (azure-metrics) you created. - Click "Save".
-
Configure Dynatrace to ingest from Event Hubs:
- In Dynatrace, navigate to "Go to settings" (gear icon).
- Under "Data ingest", select "Azure Event Hubs".
- Click "Add Azure Event Hubs".
- Provide a Connection Name (e.g.,
MyAzureVMMetrics). - Enter the Azure Event Hubs connection string. You can get this from your Event Hubs Namespace -> "Shared access policies". Create a new policy or use
RootManageSharedAccessKey(for testing, but create a more restrictive one for production) and copy its connection string. - Specify the Event Hub name (e.g.,
azure-metrics). - Select the Event Hub type as "Azure Metrics".
- Crucially, define a filter. You’ll want to filter for specific resources. For example, if your VM is named
my-app-vm-01and resides ineastus, your filter might look like:ResourceId contains "my-app-vm-01" and Location eq "eastus". - Click "Add".
Once configured, Dynatrace will start receiving metrics from your Azure VM. You’ll see these metrics appear in the host’s performance overview, overlaid with Dynatrace’s own collected metrics. This allows for immediate correlation.
The most surprising thing about this integration is that Dynatrace doesn’t just passively display these metrics; it actively uses them to enrich its own AI-driven root cause analysis. When Dynatrace detects a performance anomaly in an application service, it automatically queries the associated Azure resources for relevant Azure Monitor metrics. If it finds a correlation (e.g., high CPU on the underlying VM corresponding to slow application response times), it will explicitly highlight this correlation in its problem analysis, providing you with a precise, actionable insight that bridges the gap between your application and its infrastructure.
The next step in unified observability is often integrating Azure Activity Logs into Dynatrace to correlate changes in your Azure environment (like deployments or configuration updates) with observed performance issues.