CodexBloom - Programming Q&A Platform

How to properly handle telemetry data throttling in a high-load Node.js application using Azure Application Insights?

πŸ‘€ Views: 3 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-01
azure application-insights telemetry node.js performance JavaScript

I need some guidance on Hey everyone, I'm running into an issue that's driving me crazy... I'm experiencing issues with telemetry data being throttled in my Node.js application that uses Azure Application Insights SDK v2.1.0. When the application is under heavy load, I notice that some telemetry events are not being sent, and I'm not seeing them in my Application Insights dashboard. I suspect that this is due to the built-in throttling mechanism of the SDK, but I'm unsure how to configure it effectively for high-throughput scenarios. I've tried increasing the `maxTelemetryItemsPerSecond` setting in my initialization code like this: ```javascript const appInsights = require('applicationinsights'); appInsights.setup('<Your-Instrumentation-Key>') .setAutoCollectRequests(true) .setAutoCollectPerformance(true) .setAutoCollectExceptions(true) .setMaxTelemetryItemsPerSecond(1000) // Increasing this to allow more events .start(); ``` Despite this, I'm still encountering throttling issues and I'm getting warnings like `Telemetry throttling detected` in the logs. I've also verified that my app can handle the load, as I can see the performance metrics being recorded, but the telemetry data seems to be dropping off during peak times. I've looked into using the `Client.trackEvent()` method directly, but I need to make sure I'm not overwhelming the service. What’s the best practice for configuring telemetry for high-load scenarios? Are there additional settings or architectural patterns I should consider to ensure that all telemetry is captured without being throttled? This is part of a larger microservice I'm building.