pypi ddtrace 0.30.2

latest releases: 2.9.0rc2, 2.9.0rc1, 2.7.10...
4 years ago

Changes

This bug fix release introduces a fix for the agent writer that would cause traces to not be successfully flushed when the process forks.

Whenever we detect that we are in a new process (os.getpid() changes) we create a new queue to push finished traces into for flushing. In the previous version of the tracer (v0.29.x) we would also recreate the background thread that would read from this queue to ensure that we 1) had one background worker per-process and 2) had an updated reference to the new queue we created.

In the process of simplifying the code for the agent writer in v0.30.0 we kept the code to recreate the queue, but didn't fully replicate the behavior for recreating the background thread. This meant that whenever the process was forked the background thread would maintain a reference to the old queue object and therefore be unable to pull traces from the queue we were pushing them into causing traces to get stuck in memory in the new queue (since no one was pulling from it).

With these changes we are recreating the entire background worker whenever the process is forked. This will cause us to once again create a new queue and new background thread for flushing finished traces.

Core and Internal

  • core: rewrite agent writer on new process (#1106)
  • grpc: use callbacks to avoid waits (#1097)

Changeset

Read the full changeset.

Don't miss a new ddtrace release

NewReleases is sending notifications on new releases.