newrelic-dotnet-agent icon indicating copy to clipboard operation
newrelic-dotnet-agent copied to clipboard

Exceptions are not automatically collected to Errors Inbox in gRPC servers

Open AnhQuanTrl opened this issue 1 year ago • 3 comments
trafficstars

When an exception is thrown in a gRPC server's request, it is not automatically collected and sent to Errors Inbox.

Description When an exception is thrown in a gRPC server's request, it is not automatically collected and sent to Errors Inbox. This is in contrast with Rest API when any unhandled exceptions are automatically collected by the agent and sent to NR in Errors Inbox. We are currently creating Alerts based on percentage of errors and have noticed no errors are reported for gRPC servers.

Expected Behavior Unhandled gRPC exceptions should also be collected to Errors Inbox, similar to how exceptions in REST API.

Troubleshooting or NR Diag results [NOTE]: # ( Provide any other relevant log data such as the agent and/or profiler logs, preferably at DEBUG level or higher. ) [TIP]: # ( Scrub logs and diagnostic information for sensitive information )

Steps to Reproduce

  1. Create a gRPC server following the example.
  2. Add some REST API using traditional controllers for comparision.
  3. Install .NET agent in Linux.
  4. Add dummy exceptions to both gRPC requests and REST request and verify that unhandled gRPC exceptions are not collected as Error Events, while REST exceptions are.

Your Environment .NET Core on Linux

Additional context [TIP]: # ( Add any other context about the problem here. For example, relevant community posts or support tickets. )

For Maintainers Only or Hero Triaging this bug Suggested Priority (P1,P2,P3,P4,P5): Suggested T-Shirt size (S, M, L, XL, Unknown):

AnhQuanTrl avatar Jul 02 '24 07:07 AnhQuanTrl

https://new-relic.atlassian.net/browse/NR-287291

Hi @AnhQuanTrl -- thanks for your feedback. The .NET Agent does not currently instrument gRPC, so those related errors will not be captured. We have an open Feature Request to add gRPC support, but I'm afraid I don't have an expected release window for you at the moment. We will update this ticket when we have more information.

chynesNR avatar Jul 02 '24 17:07 chynesNR

Hi @chynesNR Thank you for quick response. While waiting for this feature, I will add a custom NoticeError in a gRPC interceptor as a workaround.

AnhQuanTrl avatar Jul 03 '24 03:07 AnhQuanTrl