No need to perform the reflection-dance for every LogEvent (Introduced with #94):
|
var traceContextProp = callContextType.GetProperty("TraceContext")?.GetValue(null); |
|
if (traceContextProp != null) |
|
{ |
|
var reqIdProp = traceCtxType.GetProperty("RequestId")?.GetValue(traceContextProp)?.ToString(); |
Should cache the lookup of callContextType.GetProperty("TraceContext") and traceCtxType.GetProperty("RequestId").
var traceContextProp = _callCtxTraceContextPropInfo.GetValue(null);
if (traceContextProp != null)
{
var reqIdProp = _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").