File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Src/StackifyLib/Internal/Logs Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -201,12 +201,22 @@ public void QueueLogMessage(Models.LogMsg msg)
201201 if ( traceCtxType != null )
202202 {
203203 var traceContextProp = callContextType . GetProperty ( "TraceContext" ) ;
204- if ( traceCtxType != null )
204+ if ( traceContextProp != null )
205205 {
206206 var traceFields = traceContextProp . GetValue ( null ) ;
207207 if ( traceFields != null )
208208 {
209- msg . TransID = traceCtxType . GetProperty ( "RequestId" ) . GetValue ( traceFields ) . ToString ( ) ;
209+ 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+
210220 }
211221 }
212222 }
You can’t perform that action at this time.
0 commit comments