Skip to content

otlp http exporter timeout doesn't work? #1141

Answered by wxl374
wxl374 asked this question in Q&A
Discussion options

You must be logged in to vote

I replayed this situation:

  1. add
    std::this_thread::sleep_for(std::chrono::seconds(1));
    before function body in
  2. remove otel-collector

It's because std::condition_variable.wait() will wait forever when notify_all() is called before wait(), but we can't make any assumption about the calling order between notify_all() and wait().

how to fix:

  1. add a private bool variable called "stop_waiting" in
    class ResponseHandler : public http_client::EventHandler
  2. use the predicated overload of wa…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by wxl374
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants