Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[receiver/opencensusreceiver] Fix memory leak on shutdown (#31152)
The opencensus receiver opens a few servers on `Start`, each of which use the context's cancel to signal shutdown. Without cancelling the context, the goroutines were being leaked. This change properly cancels the context and shutdowns the receiver's servers. This also enables `goleak` checks on the opencensus receiver and exporter. I realize the exporter is not technically related here, but its tests were what alerted me to the leak in the receiver. The `TestSendTraces` and `TestSendMetrics` tests in the exporter were starting opencensus receivers and exporters, and failing on leaks. The change here is test-only for the exporter, and a bug fix for the receiver. #30438 All existing tests are passing, as well as added `goleak` checks.
- Loading branch information