I am using AWSXRayRecorder v2.13.0 in my .NET 7 API. I am using the new Microsoft Static Analysis Tool (InferSharp) to analyze my code as well as dependent packages and I found a warning about a potential race condition:
0
/_/sdk/src/Core/Internal/Entities/Entity.cs:493: warning: Thread Safety Violation
Read/Write race. Non-private method Entity.AddSubsegment(...) indirectly reads without synchronization from this.Amazon.XRay.Recorder.Core.Internal.Entities.Entity.<IsInProgress>k__BackingField. Potentially races with write in method Entity.set_IsInProgress(...).
Reporting because this access may occur on a background thread.
I am using AWSXRayRecorder v2.13.0 in my .NET 7 API. I am using the new Microsoft Static Analysis Tool (InferSharp) to analyze my code as well as dependent packages and I found a warning about a potential race condition: