When I pulled in https://github.com/osquery/osquery-go/pull/110 to began using traces, I noticed that it was possible to have a data race when the first few spans created by a consuming application could be created at the same time. This PR fixes that issue and adds a test to confirm the fix as well.
When I pulled in https://github.com/osquery/osquery-go/pull/110 to began using traces, I noticed that it was possible to have a data race when the first few spans created by a consuming application could be created at the same time. This PR fixes that issue and adds a test to confirm the fix as well.