I need to be able to flush my metrics without disposing.
I am using Dogstatsd by calling Dogstatsd.Configure() at app startup and then calling the various metric functions during execution.
My particular use-case is such that I need to flush periodically because the app may or may not terminate at certain points and I will loose metrics that were not flushed. Currently the only way I see to flush metrics is by calling Dogstatsd.Dispose() but if I dispose, I obviously can't continue using Dogstatsd and I am unable to add a hook to Dispose when it actually terminates.
Is there a way to flush without disposing that I am not seeing?
I need to be able to flush my metrics without disposing.
I am using Dogstatsd by calling
Dogstatsd.Configure()at app startup and then calling the various metric functions during execution.My particular use-case is such that I need to flush periodically because the app may or may not terminate at certain points and I will loose metrics that were not flushed. Currently the only way I see to flush metrics is by calling
Dogstatsd.Dispose()but if I dispose, I obviously can't continue usingDogstatsdand I am unable to add a hook to Dispose when it actually terminates.Is there a way to flush without disposing that I am not seeing?