Skip to content

[receiver/azuremonitor] Config to reduce the number of resource ids in an Azure Batch API call #40112

Open
@celian-garcia

Description

@celian-garcia

Component(s)

receiver/azuremonitor

Is your feature request related to a problem? Please describe.

#40078

From @ahurtaud's answer

well we tried to follow this guide from microsoft to migrate to the new getBatch API:
https://learn.microsoft.com/en-us/azure/azure-monitor/metrics/migrate-to-batch-api?tabs=individual-response
it states clearly the 50 resources limit:
Up to 50 unique resource IDs can be specified in each call. Each resource must belong to the same subscription, region, and be of the same resource type.

However we were not aware of that 500000 TS limitation. from your log:
Exception:Microsoft.Online.QueryService.Contracts.QueryThrottledException: Cannot request more than 500000 time series per query.

I think yes its clearly the API that decide to answer nothing rather that "at least" 500K and this is the reason why you dont see any datapoints.

so every LB metrics are requested "by batch of 50" and its too much.
This 50 value is hardcoded today in the code

But I think it would make sense to make it configurable, so that you could reduce this value for your need and reduce the number of timeseries each call should returns.

I think it's pretty well explained, and the answer is yes we should have a configuration field allowing us to reduce that hardcoded 50 batch size.

Describe the solution you'd like

New configuration field maximum_resources_per_batch with a default and max value to 50.
The question will be : do we want to have different ones per resource type. Like if you know that a resource type already have low number of timeseries, it might be better to keep 50.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions