APM Tips

Glossary

Telemetry channel

The classic Application Insights SDK component that buffers telemetry items and sends them to the ingestion endpoint in batches; OpenTelemetry calls the same job an exporter.

Updated

Items leave the classic SDK through its channel, and the channel decides when. Two ship with the .NET SDK:

  • InMemoryChannel sends every 30 seconds or whenever 500 items are buffered. Its Flush() is synchronous.
  • ServerTelemetryChannel adds retries and a local StorageFolder for items it couldn’t send yet, with a transmission buffer of 5 MB by default. Its Flush() isn’t synchronous.

The Node.js SDK buffers for 15 seconds. That buffering is why short-lived console apps lose their last items: the process exits before the batch goes. Microsoft’s classic advice is to flush and then wait:

telemetryClient.Flush();
Task.Delay(5000).Wait();

The .NET SDK 3.x removes ITelemetryChannel, and Microsoft’s terminology table for OpenTelemetry maps “Channel” to “Exporter”. In the distros an exporter behind a batch processor does the sending, unsent telemetry is cached on disk and retried for up to 48 hours, and a console app flushes by disposing the OpenTelemetry SDK at shutdown.

Sources, checked

  1. Application Insights API for custom events and metrics (Classic API)learn.microsoft.com · checked
  2. Migrate from Application Insights SDKs to OpenTelemetrylearn.microsoft.com · checked
  3. Configure Azure Monitor OpenTelemetry (offline storage)learn.microsoft.com · checked

All glossary terms