We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c33fde commit 0904b9cCopy full SHA for 0904b9c
articles/azure-monitor/app/console.md
@@ -169,8 +169,12 @@ namespace ConsoleApp
169
// before exit, flush the remaining data
170
telemetryClient.Flush();
171
172
- // Flush() is synchronous when using InMemoryChannel; otherwise a short delay is required.
173
- // Task.Delay(5000).Wait();
+ // As noted at the beginning of this article, Console apps should use the WorkerService package.
+ // WorkerService uses ServerTelemetryChannel and does not have synchronous flushing.
174
+
175
+ Task.Delay(5000).Wait();
176
177
+ // Flush() is synchronous when using InMemoryChannel, in which case the short delay is not required.
178
179
}
180
0 commit comments