In:
BatchLogRecordProcessor::DoBackgroundWork()
the following code is not invoked on shutdown:
#ifdef ENABLE_THREAD_INSTRUMENTATION_PREVIEW
if (worker_thread_instrumentation_ != nullptr)
{
worker_thread_instrumentation_->OnEnd();
}
#endif /* ENABLE_THREAD_INSTRUMENTATION_PREVIEW */
This is because of:
if (synchronization_data_->is_shutdown.load() == true)
{
DrainQueue();
return; <-- HERE
}
The same code for traces uses a break instead of a return.