-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[receiver/azuremonitorreceiver] feat: Allow to not split result by dimension #36611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Not stale, the PR is still needing review. |
…mension (#37168) Recreated from a diffferent fork. Context: #36240 > <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. > Ex. Adding a feature - Explain what this achieves.--> > #### Description > > Currently there is a mechanism allowing to split the result by dimension, thanks to a filter param hack. > This is great that all the dimensions are collected as labels in the metrics, but for some resources types it could be unwanted. In cause some concern about cardinality, or continuity of the queries between one version to another (e.g with prometheus exporter, if one does not do a "sum by ..." and the otelcol version is updated, the query can display different results) > > To mitigate that I propose to put an optout for this collection so if we want for some resource types and not for others, we can create two separate receivers for example. Or we completely opt out if we don't want additional labels. > > ### Edit: > After a first review, we agreed on the fact that it could do a bit more like allowing us to specify a list of dimensions for a particular metric. > e.g from added documentation > ```yaml > receivers: > azuremonitor: > dimensions: > enabled: true > overrides: > "Microsoft.Network/azureFirewalls": > # Real example of an Azure limitation here: > # Dimensions exposed are Reason, Status, Protocol, > # but when selecting Protocol in the filters, it returns nothing. > # Note here that the metric display name is ``Network rules hit count`` but it's programmatic value is ``NetworkRuleHit`` > # Ref: https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-network-azurefirewalls-metrics > "NetworkRuleHit": [Reason, Status] > ``` > Without this config you won't have the ``azure_networkrulehit_average_Count`` metric at all in your results > But with the config we have it with reason and status labels: > > ```# HELP azure_networkrulehit_average_Count``` > ```# TYPE azure_networkrulehit_average_Count gauge``` > ```azure_networkrulehit_average_Count{azuremonitor_resource_id="/subscriptions/<redacted>/resourceGroups/<redacted>/providers/Microsoft.Network/azureFirewalls/<redacted>",location="<redacted>",metadata_reason="<redacted>",metadata_status="Allow",name="<redacted>",resource_group="<redacted>",type="Microsoft.Network/azureFirewalls"} 21.875``` > ```azure_networkrulehit_average_Count{azuremonitor_resource_id="/subscriptions/<redacted>/resourceGroups/<redacted>/providers/Microsoft.Network/azureFirewalls/<redacted>",location="<redacted>",metadata_reason="<redacted>",metadata_status="Deny",name="<redacted>",resource_group="<redacted>",type="Microsoft.Network/azureFirewalls"} 10``` > > <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> > #### Link to tracking issue > Fixes #36611 > > <!--Describe what testing was performed and which tests were added.--> > #### Testing > > <!--Describe the documentation added.--> > #### Documentation > > <!--Please delete paragraphs that you did not use before submitting.--> Signed-off-by: Célian Garcia <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Component(s)
receiver/azuremonitor
Is your feature request related to a problem? Please describe.
When collecting metrics from Microsoft Azure, there's the notion of dimensions. Each dimensions is associated to a list of values.
To get these dimensions as metadata labels, the azuremonitor receiver already collect all available dimensions in the resource definition and put them in the query filter when querying the resource metrics. This allow the query result to be "split" by dimension and thanks to that we can create the metadata labels. Cool!
Problem 1
But. In some cases Azure says that a resource definition allows a dimension and if we put them in the filter, nothing is returned.
Problem 2
Some user may want to completely disable dimensions, if they don't care about it. Or don't want a big cardinality.
Describe the solution you'd like
Problem 1 solution:
As we cannot guess by advance which dimensions is wrongly provided by Azure, we have to let the user fix it by config. Allowing her/him to override the dimensions specified by Azure.
Problem 2 solution:
A simple optout boolean, that will prevent from getting dimensions. With default value to true in order to not introduce breaking change.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: