You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(receiver/azuremonitorreceiver)! : Collect metrics labels from Azure Resource tags (#41117)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Updated `append_tags_as_attributes` configuration type from boolean to
array. It controls which Azure resource tags are added as resource
attributes to the metrics. The values can be a list of specific tag
names or `["*"]` to include all tags.
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes#40988
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Comprehensive unit tests have been added/updated to validate the changes
introduced in this PR. All newly added code is covered with 100% unit
test coverage to ensure correctness.
Please note that I do not currently have access to an Azure account, so
I have not been able to perform end-to-end testing against live Azure
resources. All changes have been validated through unit tests.
If verification with an actual Azure environment is required, please let
me know, and I will coordinate accordingly.
<!--Describe the documentation added.-->
#### Documentation
The `azuremonitorreceiver` README has been updated to reflect the
configuration changes introduced in this PR
<!--Please delete paragraphs that you did not use before submitting.-->
Updated `append_tags_as_attributes` configuration type from boolean to array. It controls which Azure resource tags are added as resource attributes to the metrics. The values can be a list of specific tag names or `["*"]` to include all tags.
Copy file name to clipboardExpand all lines: receiver/azuremonitorreceiver/README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ The following settings are optional:
37
37
- `cloud` (default = `AzureCloud`): defines which Azure cloud to use. Valid values: `AzureCloud`, `AzureUSGovernment`, `AzureChinaCloud`.
38
38
- `dimensions.enabled` (default = `true`): allows to opt out from automatically split by all the dimensions of the resource type.
39
39
- `dimensions.overrides` (default = `{}`): if dimensions are enabled, it allows you to specify a set of dimensions for a particular metric. This is a two levels map with first key being the resource type and second key being the metric name. Programmatic value should be used for metric name https://learn.microsoft.com/en-us/azure/azure-monitor/reference/metrics-index
40
+
- `append_tags_as_attributes` (default = `[]`): Controls which Azure resource tags are added as resource attributes to the metrics. Can be a list of specific tag names or `["*"]` to include all tags.
40
41
- `use_batch_api` (default = `false`): Use the batch API to fetch metrics. This is useful when the number of subscriptions is high and the API calls are rate limited.
41
42
- `maximum_resources_per_batch` (default = 50): If batch is enabled, the maximum number of unique resource IDs to fetch per API call, current limit is 50 (as of 06/16/2025) https://learn.microsoft.com/en-us/azure/azure-monitor/metrics/migrate-to-batch-api?tabs=individual-response
42
43
@@ -182,6 +183,18 @@ receivers:
182
183
"NetworkRuleHit": [Reason, Status]
183
184
```
184
185
186
+
Selectively including resource tags as attributes:
Details about the metrics scraped by this receiver can be found in [Supported metrics with Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported). This receiver adds the prefix "azure_" to all scraped metrics.
0 commit comments