Fix memory leak in SdkSpan#spanEndingThread by gerolf-da · Pull Request #7984 · open-telemetry/opentelemetry-java

@gerolf-da

SdkSpan never releases the reference to the Thread in spanEndingThread.
This means that the thread (and all the objects referenced by it) cannot
be garbage collected, if the SdkSpan is held in memory for an extended
period of time.

Since spanEndingThread is only needed in the ENDING phase, it can be set
back to null once the ENDED phase has been reached.

jack-berg

@jack-berg