cpp_client_telemetry
cpp_client_telemetry copied to clipboard
FlushAndTeardown is insufficient to save data to disk
Describe your environment. Version 3.7.62.1 c# wrapper, highly likely to repro from c++
Steps to reproduce.
var logger = LogManager.Initialize("your token");
var config = new LogConfiguration()
{
OfflineStorage = "C:\\path\\",
MaxTeardownUploadTimeInSec = 0,
};
LogManager.PauseTransmission();
for (var i = 0; i < 1000; i++)
{
var ev = new EventProperties("test");
logger.LogEvent(ev);
}
LogManager.FlushAndTeardown();
What is the expected behavior? All 1000 events are persisted to disk
What is the actual behavior? <1000 seen
Additional context. Adding a Flush before FlushAndTeardown resolves the problem but is clearly a hack. Discussed here: https://github.com/microsoft/cpp_client_telemetry/pull/1186
@lalitb @mkoscumb