Last active
June 24, 2021 21:48
-
-
Save ealsur/2c47d38c9c2fa7cbe122f011743509be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void captureDiagnostics(CosmosDiagnostics diagnostics) | |
{ | |
if (diagnostics.GetClientElapsedTime() > SomePredefinedThresholdTime) | |
{ | |
Console.WriteLine(diagnostics.ToString()); | |
} | |
} | |
services.AddCosmosCache((CosmosCacheOptions cacheOptions) => | |
{ | |
cacheOptions.DiagnosticsHandler = captureDiagnostics; | |
/* other options */ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment