We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31cd5ea commit c4b0c9dCopy full SHA for c4b0c9d
1 file changed
Src/StackifyLib/Internal/Logs/LogQueue.cs
@@ -201,12 +201,22 @@ public void QueueLogMessage(Models.LogMsg msg)
201
if(traceCtxType != null)
202
{
203
var traceContextProp = callContextType.GetProperty("TraceContext");
204
- if(traceCtxType != null)
+ if(traceContextProp != null)
205
206
var traceFields = traceContextProp.GetValue(null);
207
if (traceFields != null)
208
209
- msg.TransID = traceCtxType.GetProperty("RequestId").GetValue(traceFields).ToString();
+ var reqIdProp = traceCtxType.GetProperty("RequestId");
210
+
211
+ if (reqIdProp != null)
212
+ {
213
+ var transIDVal = reqIdProp.GetValue(traceFields);
214
+ if (transIDVal != null)
215
216
+ msg.TransID = transIDVal.ToString();
217
+ }
218
219
220
}
221
222
0 commit comments