Skip to content

Commit 5b48e42

Browse files
authored
Documenting flush perf issue
We get this issue every month... customers who have <trace autoflush=true/> and that causes perf issues in their web apps. Adding this note to help customers discover this issue in our public docs too.
1 parent 2dae5d5 commit 5b48e42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

articles/azure-monitor/app/api-custom-events-metrics.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ telemetry.flush();
678678
The function is asynchronous for the [server telemetry channel](https://www.nuget.org/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel/).
679679

680680
> [!NOTE]
681-
> The Java and JavaScript SDKs automatically flush on application shutdown.
681+
> - The Java and JavaScript SDKs automatically flush on application shutdown.
682+
> - **Review Autoflush configuration**: [Enabling autoflush](https://learn.microsoft.com/dotnet/api/system.diagnostics.trace.autoflush) in your `web.config` file can lead to performance degradation in .NET applications instrumented with Application Insights. With autoflush enabled, every invocation of `System.Diagnostics.Trace.Trace*` methods results in individual telemetry items being sent as separate distinct web requests to the ingestion service. This can potentially cause network and storage exhaustion on your web servers. For enhanced performance, it’s recommended to disable autoflush and also, utilize the [ServerTelemetryChannel](https://learn.microsoft.com/azure/azure-monitor/app/telemetry-channels#built-in-telemetry-channels), designed for a more effective telemetry data transmission.
682683
683684
## Authenticated users
684685

0 commit comments

Comments
 (0)