Skip to content
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

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

celian-garcia
Copy link

Recreated from a diffferent fork. Context: #36467

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: #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.

Link to tracking issue

Fixes #36612

Testing

Documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[receiver/azuremonitorreceiver] feat: multi subscriptions support and automatic discovery
2 participants