Improve diagnostic logging for exceptions throw in `InvokableObjectManager`
- Dominant language
- C#
- Stars
- 10.9k
- Forks
- 2.1k
- Avg merge
- 13h 56m
- Merged PRs (30d)
- 351
Description
When logging these exceptions, we should also log details about the local object, eg the object class type and GrainId:
```
System.NullReferenceException: Object reference not set to an instance of an object.
at OrleansCodeGen.Orleans.Runtime.Invokable_IGrainCallCancellationExtension_GrainReference_Ext_FA239824.InvokeInner() in /_/src/Orleans.Core/obj/Release/net8.0/Orleans.CodeGenerator/Orleans.CodeGenerator.OrleansSerializationSourceGenerator/Orleans.Core.orleans.g.cs:line 69
at Orleans.Runtime.Request.Invoke() in /_/src/Orleans.Core.Abstractions/Runtime/GrainReference.cs:line 615
--- End of stack trace from previous location ---
at Orleans.Runtime.GrainMethodInvoker.Invoke() in /_/src/Orleans.Core/Core/GrainMethodInvoker.cs:line 132
at XXX.Services.Orleans.RetryFilter.Invoke(IIncomingGrainCallContext context) in /mnt/vss/_work/1/s/src/libraries/XXX.Services.Orleans/Filters/RetryFilter.cs:line 98
at Orleans.Runtime.GrainMethodInvoker.Invoke() in /_/src/Orleans.Core/Core/GrainMethodInvoker.cs:line 94
at XXX.Services.Orleans.IncomingTelemetryFilter.Invoke(IIncomingGrainCallContext context) in /mnt/vss/_work/1/s/src/libraries/XXX.Services.Orleans/Filters/IncomingTelemetryFilter.cs:line 75
at Orleans.Runtime.GrainMethodInvoker.Invoke() in /_/src/Orleans.Core/Core/GrainMethodInvoker.cs:line 94
at Orleans.InvokableObjectManager.LocalObjectData.LocalObjectMessagePumpAsync() in /_/src/Orleans.Core/Runtime/InvokableObjectManager.cs:line 246
````
Contributor guide
Research direction
Start in src/Orleans.Core/Runtime/InvokableObjectManager.cs around line 246 and inspect how exceptions from the local object message pump are logged. Confirm where the local object’s class type and GrainId are available, then verify that exception diagnostics include both details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100