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 #36467

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

celian-garcia
Copy link

@celian-garcia celian-garcia commented Nov 20, 2024

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

@celian-garcia celian-garcia force-pushed the feat/discovery branch 7 times, most recently from 3c32572 to e67ae55 Compare November 25, 2024 14:58
@celian-garcia celian-garcia marked this pull request as ready for review November 25, 2024 15:12
@celian-garcia celian-garcia requested a review from a team as a code owner November 25, 2024 15:12
@celian-garcia celian-garcia force-pushed the feat/discovery branch 2 times, most recently from da3be93 to b99931a Compare December 2, 2024 09:08
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