Skip to content

Commit 02971c7

Browse files
Merge pull request #276713 from toddfoust/patch-37
Documenting flush perf issue
2 parents aa1aa8f + 5b48e42 commit 02971c7

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)