Open carlosroman opened 4 years ago
Next steps: Make sure there's a shutdown event in our harvester for the Telemetry SDK.
Currently, I believe the caller should call HarvestNow() to make sure all the data is sent, and it's just assumed the ticker will stop due to the whole application shutting down. Here's what happens in the New Relic OpenTelemetry Exporter: https://github.com/newrelic/opentelemetry-exporter-go/blob/7c24e335d64821f6aaec96e1c48d478bcb290d70/newrelic/exporter.go#L205 No mention of stopping a ticker. We should stop the ticker when Exporter.Shutdown() is called.
Currently the harvester runs a go routine with tick that will tick forever. It would be good to be able to stop the ticker when the harvester is no longer needed.