-
Notifications
You must be signed in to change notification settings - Fork 855
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
Control the handling of TaskCanceledException and other exceptions #2195
Comments
Please share the full log and stack trace you're concerned about.
We have a policy against customizing log levels, it doesn't scale.
This is more plausible. |
Sure, here is the stacktrace:
And the whole log entry (changed RequestPath as i can't show deails of what we are working on):
Thanks for your help 😃 |
We have the same problem with our application. So most of our exception logs are
Error:
Message:
Parsed Stack trace
|
Triage:
|
+1 for this, we are also seeing these as noise in our telemetry unfortunately |
Now that we moved these logs from |
+1 Same here. I get a notification on my mobile when there are exceptions raised by the servers. We have a multitenant SAAS tool and I'm getting pinged when our SPA client app cancels a request (e.g. when a customer paginates quickly through lists on our client app). |
#2503 is moving |
What should we add or change to make your life better?
Our setup
We use YARP as a gateway from our frontend client to the backend services, with communication via gRPC-web.
The suggestion
We encounter an issue when the client leaves a page while streaming data from a backend service through the YARP proxy. YARP throws a
TaskCanceledException
in this scenario. No error is thrown or logged by the backend service. We expect this exception to be thrown, as it usually is when a task is canceled. However, it is currently not possible to catch and handle the exception with YARP. This is problematic for us because YARP logs the exception, which then gets caught by our analytics.We have attempted to add middleware to address this issue, but we have been unable to stop the logging of the exception.
Changing the log level to not log errors is not a viable solution as we may miss other important errors.
We suggest one of the following solutions:
TaskCanceledException
since it is an expected exception.Why is this important to you?
This is important to us as we don't want to log expected exceptions, which then gets reported by our analytics.
The text was updated successfully, but these errors were encountered: