google / mtail

extract internal monitoring data from application logs for collection in a timeseries database
Apache License 2.0
3.82k stars 378 forks source link

Explicitly stop the `Exporter` when main routines are done. #860

Closed jaqx0r closed 4 months ago

jaqx0r commented 4 months ago

The Exporter and HTTPServer are not connected by channels to the Runtime, only indirectly through mutating effects on the Store. As such we can't rely on the Exporter to shut down automatically when the Runtime shuts down.

Here instead we remove the WaitGroup and allow an Exporter to be shut down explicitly after the WaitGroup is Done.

Issue: #331

github-actions[bot] commented 4 months ago

Unit Test Results

    1 files     27 suites   8m 52s :stopwatch:   648 tests   647 :white_check_mark: 1 :zzz: 0 :x: 1 917 runs  1 914 :white_check_mark: 3 :zzz: 0 :x:

Results for commit 64c82f4d.