opencensus-cpp
opencensus-cpp copied to clipboard
What is the recommended way to gracefully shutdown?
Is there a recommended way to terminate short lived programs? I am thinking of examples, tests, or batch processes that may have completed their work but want to give OpenCensus time to complete its work before shutting down.
Currently we sleep to let the stats aggregation and exporting happen, which isn't ideal.
That is what I thought. No rush, but any plans to have something better?
I've been thinking about it but I don't have a good proposal yet.
Related discussions:
- https://github.com/census-instrumentation/opencensus-specs/issues/152 for flushing stats
- https://github.com/census-instrumentation/opencensus-specs/issues/126 for flushing traces
Have there been any progress on adding a flush capability? I ran into this problem today and had to add a wait to the end of my program (which is short lived).
I'm afraid not. I'm very limited in how much time I can spend on OpenCensus. Check out https://github.com/open-telemetry/opentelemetry-cpp/
No problem, it looks like this is the relevant feature on the opentelemetry side. I look forward to migrating once everything is ready :)