Skip to content

[receiver/azuremonitorreceiver] feat: multi subscriptions support and automatic discovery #36612

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

Closed
celian-garcia opened this issue Dec 2, 2024 · 3 comments · Fixed by #37167

Comments

@celian-garcia
Copy link
Member

Component(s)

receiver/azuremonitor

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

When a tenant contains multiple subscriptions, if a new one is created you have to create a new receiver.

Describe the solution you'd like

I want to be able to say "take all the subscriptions of the tenant"

Describe alternatives you've considered

Maintaining a config but too painful.

Additional context

For an additional context, I'd like to create a new PR after that to revive the topic of the batch api usage. #29593

The idea is that if you have many subscription with many resources, you can be rate limited by Azure with the current get of Resource metrics. Using the batch API, you don't have anymore the problems of rate limitation. We're using already it from a fork in Amadeus for 1 year and it's promising.

@celian-garcia celian-garcia added enhancement New feature or request needs triage New item requiring triage labels Dec 2, 2024
Copy link
Contributor

github-actions bot commented Dec 2, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

github-actions bot commented Feb 3, 2025

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 @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Feb 3, 2025
@celian-garcia
Copy link
Member Author

Not stale, the PR is still needing review.

Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this issue Apr 24, 2025
… automatic discovery (open-telemetry#37167)

Recreated from a diffferent fork. Context:
open-telemetry#36467

> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
> Ex. Adding a feature - Explain what this achieves.-->
> #### Description
> 
> This PR allows to discover and scrape all the subscriptions located in
the tenant.
> I'm adding also at the same time the ability to give multiple
subscriptions as it's free and can also be desired.
> 
> This is a part of this PR:
open-telemetry#29593
that has been split for readability.
> Indeed in a next PR, I'll propose the usage of the getBatch of metrics
Azure API. Because if your tenant contains a lot of subscription, you
can face rate limitations.
> 
> 
> It contains also a little refactor of the tests and the "backdoor"
used to mock the API. Now the tests are using the way provided by Azure:
the fake API.
https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes
> The "backdoor" is now only the client options. So no weird interfaces
nor weird constructor for the Azure clients inside the ``scraper.go``
file.
> 
> <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable.
-->
> #### Link to tracking issue
> Fixes open-telemetry#36612
> 
> <!--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.-->

Thanks to the tests refactoring, closes open-telemetry#31264 (at best it fixes it, at
worst this makes it obsolete), relates also open-telemetry#38639

Signed-off-by: Célian Garcia <[email protected]>
Co-authored-by: Joshua MacDonald <[email protected]>
Co-authored-by: Antoine Toulme <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment