You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a Node web API that connects to Azure table storage and logs to Application Insights. It was upgraded to use version 2.9.1 of the App Insights package and some time after that, we noticed the application was running slowly and with high memory usage. After a restart, the memory starts low and gradually ramps up over time.
We are using the default configuration for the Application Insights client, ie enableAutoCollectDependencies is true and enableAutoCollectPreAggregatedMetrics ` is also true.
After adding some log statements in the Application Insights package, I discovered that the AutoCollectPreAggregatedMetrics._dependencyCountersCollection collection keeps growing forever. It turns out in our case the vast moajority of the items in this array are for HTTP calls to Azure Table Storage, here's an example showing two counters:
In this case, two HTTP calls were made to table storage to fetch an entity. Because the URLs in the dependencyTarget are different, the code in AutoCollection/PreAggregatedMetrics.ts treats them as different counters and appends to the collection. I have a minimal repro repository here
Our application handles a lot of traffic to and from table storage, with most of the calls having a unique value in the row key value, hence most of the calls to table storage are for unique URLs.
Can you advise if this is expected behaviour, or if there is any way to clear out the aggregated counters periodically? For now we have disabled auto-collection of pre-aggregated metrics to work around the issue.
The text was updated successfully, but these errors were encountered:
@umamimolecule thanks for reproducible environment, this is a high cardinality issue caused by Span created by Azure SDK instrumentation being used internally.
We have a Node web API that connects to Azure table storage and logs to Application Insights. It was upgraded to use version 2.9.1 of the App Insights package and some time after that, we noticed the application was running slowly and with high memory usage. After a restart, the memory starts low and gradually ramps up over time.
We are using the default configuration for the Application Insights client, ie
enableAutoCollectDependencies
is true and enableAutoCollectPreAggregatedMetrics ` is also true.After adding some log statements in the Application Insights package, I discovered that the
AutoCollectPreAggregatedMetrics._dependencyCountersCollection
collection keeps growing forever. It turns out in our case the vast moajority of the items in this array are for HTTP calls to Azure Table Storage, here's an example showing two counters:In this case, two HTTP calls were made to table storage to fetch an entity. Because the URLs in the
dependencyTarget
are different, the code in AutoCollection/PreAggregatedMetrics.ts treats them as different counters and appends to the collection. I have a minimal repro repository hereOur application handles a lot of traffic to and from table storage, with most of the calls having a unique value in the row key value, hence most of the calls to table storage are for unique URLs.
Can you advise if this is expected behaviour, or if there is any way to clear out the aggregated counters periodically? For now we have disabled auto-collection of pre-aggregated metrics to work around the issue.
The text was updated successfully, but these errors were encountered: