-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[BUG] BlobBaseClient.Exists always logs exceptions to App Insights when the blob does not exist. #18592
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. Issue DetailsDescribe the bug Expected behavior Actual behavior (include Exception or Stack Trace) To Reproduce
Environment:
The problem seems to be here azure-sdk-for-net/sdk/storage/Azure.Storage.Queues/src/Generated/ServiceRestClient.cs Line 162 in f01cbdc
The code throws an exception for anything other than a 200 response - but 404 is not an exceptional response, it is very much expected - in fact, I expect to call it for non-existent blobs more often than any other blob scenario. Ultimately, the exception is swallowed here But, by this point in time, the exception has already been logged to App Insights.
|
//cc: @tg-msft, as he was involved in an earlier discussion on this topic. |
Thank you for your feedback. Tagging and routing to the team best able to assist. |
This is waiting on #9934. |
I am experiencing the same problem and looking forward to a fix of this |
Last I heard, we're still officially waiting for an answer from the Observability folks. +@pakrym who recently removed some noise for CreateIfNotExists calls and can comment further. I don't think his recent change would help with BlobBaseClient.Exists though because we don't add any conditional headers to the request. |
We haven't gotten clear guidance but I think we can still make progress on our own. We are going to start with fixing the |
I am also seeing this behavior. Any updates? |
@tg-msft Ted any update on this? @jaschrep-msft can you please track this from our side? |
Yes, the basic Azure.Core features are now in (but not shipped yet) and the generator has been updated to produce LLC protocol methods with a flag. That means you could start enabling this with a package reference, though it won't fully light up until a fix for Azure/autorest.csharp#2006 is committed and deployed. |
@tg-msft It looks like that AutoRest issue was fixed in March. Is this one going to be fixed as well? |
The required APIs should be available now in Azure.Core to be able to implement this feature. In order to suppress distributed tracing for a given status code, Please reach out with any remaining questions on implementation. |
Describe the bug
BlobBaseClient.Exists files lots of false exceptions in App Insights when the blob does not exist.
Expected behavior
Checking if a blob exists should simply return false, not log an exception in App Insights.
Actual behavior (include Exception or Stack Trace)
App Insights is littered with false-positive exceptions due to a 404 response code to a HEAD request.
To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)
Environment:
The problem seems to be here
azure-sdk-for-net/sdk/storage/Azure.Storage.Queues/src/Generated/ServiceRestClient.cs
Line 162 in f01cbdc
The code throws an exception for anything other than a 200 response - but 404 is not an exceptional response, it is very much expected - in fact, I expect to call it for non-existent blobs more often than any other blob scenario.
Ultimately, the exception is swallowed here
https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs#L2952
But, by this point in time, the exception has already been logged to App Insights.
The text was updated successfully, but these errors were encountered: