-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
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
| 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();
}Metadata
Metadata
Assignees
Labels
No labels