Skip to content

[SDK] BatchLogRecordProcessor is not calling thread instrumentation on shutdown #3261

@marcalff

Description

@marcalff

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions