Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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