---
title: "Configure metric collection | Grafana Labs"
description: "Learn how to configure automatic metric discovery and collection for your Azure resources."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Configure metric collection

In this milestone, you’ll configure automatic metric discovery including adding tags for your Azure resources. Cloud Provider Observability uses autodiscovery to automatically find and collect metrics from all available Azure resources in your subscriptions, eliminating the need to manually specify resources and metrics.

Autodiscovery provides the fastest path to comprehensive Azure monitoring by automatically detecting resources as they’re created or modified in your Azure environment. Available metrics refresh every hour, and your configuration automatically updates as your environment evolves.

Tags help you categorize metrics in Grafana Cloud and filter dashboards by specific resource groups, environments, or teams.

By default, resource information including tags is available on the `resource_info` metric. When you add a tag here, you can add tags to your Azure Monitor metrics or filter the Azure Monitor metrics collected by tags.

## Configure autodiscovery and tags

To configure metric collection using autodiscovery, complete the following steps:

1. In the **Configure metrics** section of the Azure credential configuration page, select **Autodiscovery**.
   
   This option automatically collects metrics from all resources found in your Azure subscriptions.
2. (Optional) In the **Tags** section, add Azure-formatted tags to organize and filter your metrics.
   
   To add a tag, complete the following steps:
   
   1. Click **Add tag**.
   2. In the **Key** field, enter the Azure tag key.
      
      For example, enter `Environment`.
   3. In the **Value** field, enter the Azure tag value.
      
      For example, enter `Production`.
   
   > Note
   > 
   > These tags must match the tags configured on your Azure resources. For more information about Azure tags, refer to [Use tags to organize your Azure resources](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources) in the Azure documentation.
3. Review the subscription information to ensure the correct Azure subscriptions are included.
   
   The configuration displays all subscriptions accessible by the service principal you created.
4. Click **Create credential** to save your configuration and begin collecting metrics.
   
   Cloud Provider Observability immediately begins discovering resources and collecting metrics from your Azure subscriptions. Metrics are collected every two minutes, and available metrics refresh every hour.

Your Azure monitoring configuration is complete and metric collection has started.

In your next milestone, you’ll verify that data is being collected and sent to Grafana Cloud.
