-
Notifications
You must be signed in to change notification settings - Fork 3k
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
DecodeError retrieving data from monitor api #40228
Comments
Hello @rcampos87. I'm an AI assistant for the azure-sdk-for-python repository. I have some suggestions that you can try out while the team gets back to you. • Ensure you’re using the latest version of the library in case this is a bug that’s already been addressed. See the azure-mgmt-monitor README for upgrade instructions. • If the error occurs when cost is high (resulting in larger payloads), consider adding retry logic or inspecting network conditions—malformed or truncated JSON may indicate issues with the service response. • Compare this behavior with similar issues in the repository (for example, issues #11271 and #29570) to see if there’s a pattern or if any workarounds have been suggested. • If the issue persists, consider capturing complete request/response traces to help with debugging or file a new issue with detailed steps and logs. The team will get back to you shortly, hopefully this helps in the meantime. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @gulopesd @Haiying-MSFT @jairmyree @joshfree @KarishmaGhiya @KevinBlasko @kurtzeborn @nisha-bhatia @pvaneck @scottaddie @srnagar @ToddKingMSFT. |
@ChenxiJiang333 Please help make an investigation for this issue. |
got it |
Hi @rcampos87, it seems some json data returned by the service doesn't respect the right schema. Since the DecodeError happens often, is that possible for you to share part of the log where you meet these errors to help us locate the invalid json data? You could save the whole output of SDK in a .txt file by copying the following code in your .py file:
And set logging_enable=True when calling operation:
Please also remember to conceal the sensitive info in your log. |
@ChenxiJiang333 just to confirm, |
Hi @rcampos87, yes, and even if
|
Ok, I will update the code, it might be a few days before it errors again, lets see. thanks @ChenxiJiang333 I will get back to you. |
I think it could be quick to check whether the logs could be printed by these settings, not need to wait for the error message? |
Yep, In the logs I can see so far, for example, is:
but no other debug logs coming from the sdk, is it expected? will it show more on error? |
Hi @rcampos87, I saw a request has been made to get metrics in the log, then there should be response body printed next to the response headers. Did you mean you didn't find any response body in the log?
|
Hi @ChenxiJiang333 I added |
could you see the response content in the log, for example: |
Describe the bug
In the past few days I have been seeing a lot of DecodeError from the sdk when trying to ingest monitor data from VMs.
As far as I know, it happens randomly when the request has a high cost.
Others json is invalid include:
To Reproduce
It occurs randomly.
Expected behavior
Either return a proper response or none at all.
Additional context
This error has been caught by NewRelic, it happens at
The text was updated successfully, but these errors were encountered: