newrelic / newrelic-dotnet-agent

The New Relic .NET language agent.
Apache License 2.0
94 stars 55 forks source link

Exceptions are not automatically collected to Errors Inbox in gRPC servers #2589

Open AnhQuanTrl opened 4 days ago

AnhQuanTrl commented 4 days ago

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

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

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

workato-integration[bot] commented 4 days ago

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

chynesNR commented 4 days ago

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.

AnhQuanTrl commented 3 days ago

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.