-
Notifications
You must be signed in to change notification settings - Fork 292
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
TrackException does not send large Aggregate Exceptions to Application Insights #2946
Comments
not enough information to know why the Exception is getting dropped. |
does the log contains sensitive information? I've added } catch (Exception ex) {
logging.TrackException(ex);
await logging.FlushAsync(CancellationToken.None);
Console.WriteLine(ex.Message, Color.Red);
Task.Delay(5000).Wait();
Console.WriteLine("Done waiting", Color.Red);
} but the log contains:
Is it possible that Azure Credentials is too big? |
This looks similar to #2284 |
I've been able to reproduce here: |
My guess is that SDK is not calculating "max" values when dealing with inner exceptions. So when I have 1 large exception this code works fine Lines 15 to 26 in c442ad3
but when there are inner exceptions, each one of them is trimmed but in aggregate, they all exceed max payload size and are getting dropped. |
*.csproj
file):<Project Sdk="Microsoft.NET.Sdk">
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
Describe the bug
I'm using following method to Track Exceptions:
I also tried with
FlushAsync
andThread.Sleep
/Task.Delay()
to make sure telemetry is sent.My service is throwing an exception when connection to Azure App Configuration using DefaultAzureCredentials.
Exception is:
With the reason for the error being the wrong scope for the token
For some reason:
_telemetryClient.TrackException(new InvalidOperationException("Coordinator Crashed!"), _properties);
- WORKS_telemetryClient.TrackTrace("Coordinator Crashed!: " + ex, SeverityLevel.Critical, _properties);
- WORKS_telemetryClient.TrackException(ex, _properties);
- DOESN'T WORK - exception is nowhere to be found in app insightsException is thrown when application is crashing (exiting). Adding
Console.ReadLine()
or flushing telemetry did not help.Warning
Is there anything in app insights that filters out that exception? it it related to it having
WWW-Authenticate
data?To Reproduce
Sample app.
For Immediate Support
For immediate support relating to the Application Insights .NET SDK we encourage you to file an Azure Support Request with Microsoft Azure instead of filing a GitHub Issue in this repository.
You can do so by going online to the Azure portal and submitting a support request. Access to subscription management and billing support is included with your Microsoft Azure subscription, and technical support is provided through one of the Azure Support Plans. For step-by-step guidance for the Azure portal, see How to create an Azure support request. Alternatively, you can create and manage your support tickets programmatically using the Azure Support ticket REST API
The text was updated successfully, but these errors were encountered: