No need to perform the reflection-dance for every LogEvent (Introduced with #94):
| vartraceContextProp=callContextType.GetProperty("TraceContext")?.GetValue(null); |
| if(traceContextProp!=null) |
| { |
| varreqIdProp=traceCtxType.GetProperty("RequestId")?.GetValue(traceContextProp)?.ToString(); |
Should cache the lookup of callContextType.GetProperty("TraceContext") and traceCtxType.GetProperty("RequestId").
vartraceContextProp=_callCtxTraceContextPropInfo.GetValue(null);if(traceContextProp!=null){varreqIdProp=_traceCtxRequestIdPropInfo.GetValue(traceContextProp)?.ToString();}
No need to perform the reflection-dance for every LogEvent (Introduced with #94):
stackify-api-dotnet/Src/StackifyLib/Internal/Logs/LogQueue.cs
Lines 201 to 204 in ac13f57
Should cache the lookup of
callContextType.GetProperty("TraceContext")andtraceCtxType.GetProperty("RequestId").