-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[azuremonitorreceiver] Add the ability to pull Resource Metrics using AZ Query Batch API #29593
[azuremonitorreceiver] Add the ability to pull Resource Metrics using AZ Query Batch API #29593
Conversation
… the Batch API. Currently a Proof-of-Concept that does not allow Resources to exist in different regions and does not filter based on dimensions similar to how it's being handled in the previous implementation (by Resource).
@@ -26,6 +26,7 @@ var ( | |||
errMissingClientSecret = errors.New(`ClientSecret" is not specified in config`) | |||
errMissingFedTokenFile = errors.New(`FederatedTokenFile is not specified in config`) | |||
errInvalidCloud = errors.New(`Cloud" is invalid`) | |||
errInvalidRegion = errors.New("`Region` is not specifiec in config`") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! typo.
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
I have pulled the code and compiled a version, tested it on one subscription and it's a really good start! As in first comment, we are seeing few errors but I am more concerned about this one: I think this correspond to microsoft to: And also, I would like to start a discussion (maybe for a second PR / feature request) (ping @altuner @codeboten):
WDYT? (please tell me if you want me to raise a new issue for this feature request, this getBatch will anyway be a requirement first) |
@ahurtaud - I ran into a few errors. But not that one specifically. I didn't realize that there was a limit to be honest. The documentation was kind of hard to understand. I had some concerns about the number of Dimensions that I was pulling so I did some testing there and it would be really nice to be able to determine the number of dimensions that a Metric can have instead of having to hard code the values. I think it would be pretty easy to break the requests up into batches of 50, I guess I didn't read all of the documentation :-D |
Want to ping those who worked on this previously as I also think the component would benefit from switching to use the
In the long run these change could help with scalability, though it's unknown when/if that would be helpful. And my purpose for proposing the changes now is to simplify testing on more paths. Before I opened an issue for changes around this I wanted to get input from those who have looked at this receiver and might have informed opinions to share. Please share any thoughts you have on this: @cparkins @ahurtaud |
I agree. Maybe it's just easy to confuse me when there are multiple numbers involved. Most things in the SDK are straightforward as you get familiar with their patterns and the Azure object model, but I believe some calls are limited to 20, I recall reading that one was limited to 10, and @hurtaud has errors that say limit of 50 on something else. Currently the default config in
The current mechanism that deals with dimensions is the
Configurable batch sizes would definitely help. We could depend on a batcher package like this for example, make/copy our own like it, or use methods that will work almost as well if controlled in the context. The nice thing about the fancy one is that we don't have to manage keying on the metrics composite key, so you specify how to aggregate batches by options and you can fire calls as soon as you have a full batch or a configured batch timeframe expires. Maybe this provides some useful information on the code's current state. Hopefully, it isn't a complete waist of time when the PoC version is considered. I plan to have a closer look at that code in a couple of hours. |
I like where the PR is headed. I'm planning to open an issue as something like |
@nslaughter I like the thoughts you have on how to improve the receiver in general. While writing this code I thought some time should be taken to consider different ways to pull the various bits of data that are being used when scraping. Unfortunately I didn't take much time to look at other ways that we could pull the data that might be more efficient. I really like the idea of using the batcher though. And I think that eventually this code will run into issues with getting consistent metrics because of the way it's written (multiple timers triggering at multiple intervals). I'm open to ideas based on this Draft PR and look forward to seeing what you think once you get more in depth. |
The docs say that custom metrics can have up to 10 dimensions. The metric definitions list the preset dimensions for predefined ones. Does this help or you getting at something else? |
That does help actually. I was trying to determine the number of standard dimensions for a Storage Account and got to 30.... I probably need to look at the REST responses a little more closely to get this one solved better. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
…aining metrics values
…-batch-api azure monitor receiver - getBatch few enhancement
…eceiver/use-batch-api
…calculating the nearest minute and then add a check to ensure the last update was not within the time grain. In addition add more logging around erorrs received from the Batch API by casting to the Azure Response Error type and logging the full error.
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
@cparkins Any reason this was not continued? With the current throttling limits its can be a hassle to get all the wanted metrics from Azure |
Hello @tesharp. I took back the topic from Amadeus side. The plan is to separate in several PRs for readability.
|
Add the ability to pull Resource Metrics using the AZ Query Batch API. Currently a Proof-of-Concept that does not allow Resources to exist in different regions and does not filter based on dimensions similar to how it's being handled in the previous implementation (by Resource).
Description:
This is an enhancement to try and avoid limitations when querying resource directly by using the AZ Query Batch API that was recently released for the GO SDK.
Link to tracking Issue:
Testing:
Tested locally against a Resource Group in an single region. Some issues exist that still need to be investigated.
Documentation:
This will be updated once the Draft is discussed.