Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
marcalff opened this issue Feb 4, 2025 · 0 comments · Fixed by #3262
Closed

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

marcalff opened this issue Feb 4, 2025 · 0 comments · Fixed by #3262
Assignees
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@marcalff
Copy link
Member

marcalff commented Feb 4, 2025

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.

@marcalff marcalff added the bug Something isn't working label Feb 4, 2025
@marcalff marcalff self-assigned this Feb 4, 2025
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Feb 4, 2025
@marcalff marcalff added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant