This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make InMemorySender Asynchronous To demonstrate lost span problem (to be shortly reported). When AppendAsync is actually asynchronous, some spans are lost on Tracer Dispose. This change should have no effect, but causes RemoteReporterTests.TestRemoteReporterFlushesOnClose to fail intermittently. Signed-off-by: phxnsharp <[email protected]> * Do not use Task.Factory.StartNew For some reason awaiting the task returned always completes immediately. Signed-off-by: phxnsharp <[email protected]> * Add Thread Safety to InMemorySender This didn't help reliability, but I believe it is necessary because different threads may be adding and flushing at the same time. Signed-off-by: phxnsharp <[email protected]> * Style cleanup Use slightly better style for _blocker. Also, turns out async in Flush causes other issues, removed for now. Signed-off-by: phxnsharp <[email protected]> * Fix Intermittent Test Failure Found several problems that were contributing: - RemoteControlledSampler was using a long lived Wait() call on a thread pool thread, which was consuming Thread Pool threads and causing delays as the thread pool was exausted - RemoteReporter.ProcessQueueLoop does have long lived waits due to the BlockingQueue. Reworked it to work correctly on a LongLived thread without consuming thread pool threads. - Many of the tests were leaving behind the ProcessQueueLoop because the blocker was never released. There is still an intermittent test failure, but that was there before I started changing code. Signed-off-by: phxnsharp <[email protected]> Co-authored-by: Benjamin Krämer <[email protected]>
- Loading branch information