newrelic / newrelic-lambda-tracer-java

New Relic OpenTracing AWS Lambda Tracer for Java
Apache License 2.0
1 stars 10 forks source link

Big refactor #16

Closed MattWhelan closed 3 years ago

MattWhelan commented 3 years ago

In attempting to fix the threading issues in the former implementation, it became apparent that the implementation had some deep structural issues. This change attempts to address those issues by reassigning responsibilities to the appropriate classes, and making appropriate use of thread safety primitives, as well as non-mutable data where appropriate.

MattWhelan commented 3 years ago

I've tested this in a multi-threaded scenario: spans finish outside the main thread, and they get collected correctly with this change, but not with the old version.