Skip to content

[receiver/azuremonitor] use_batch_api should parallelize the calls by subscription #39417

@celian-garcia

Description

@celian-garcia

Component(s)

receiver/azuremonitor

What happened?

Description

When using use_batch_api: true (0.124+) and when we enable subscription discovery with a lot of subscriptions in the tenant, it seems that it fails to retrieve the metrics for all the subscriptions.

Here is an example of result without/with parallelization of subscription calls.
Image

After 2PM, it's the upstream version, it's doing the subscriptions called synchronously one by one.
I've got back the sync mode in the new code to not break the fact that subscription was a resource attribute. It's difficult (impossible) to build several otel resource data in parallel.
Before 2PM, it's a custom fork of use_batch_api, doing all the "by subscriptions" calls in parallel. It works as subscription attribute is moved from resource level to data point level. So there is one otel resource by azure tenant, we're not constraint to build several otel resource data in parallel.
References

Collector version

v0.124.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

Log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnever staleIssues marked with this label will be never staled and automatically removedreceiver/azuremonitor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions