Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.92k stars 442 forks source link

Allow filtering of app insights dependency tracking #7200

Open qetza opened 3 years ago

qetza commented 3 years ago

What problem would the feature you're requesting solve? Please describe.

It is possible to enable/disable Application Insights dependency tracking through the host.json file but this is an all or nothing settings.

I would like to be able to enable dependency tracking and specify which dependency i will track through configuration and avoid using a custom ITelemetryProcessor. I need this because the latest Azure SDKs are tracking too much dependencies. For example with Event Hubs there is one entry for each message created in memory and one for each send, for Storage we have one entry for the method call and one for the actual HTTP call. This increase the number of billed data in Application Insights too much.

Describe the solution you'd like

A solution would be to have a new section dependencyTrackingFilters under applicationInsights in the host.json where we could add dependency entry names to exclude (or include).

Describe alternatives you've considered

Alternative is to create our own ITelemetryProcessor and inject it.

Additional context

The issue here is really about cost management in Application Insights. All MS teams working on Azure SDKs/products and supporting Application Insights should have this cost requirement in mind.

v-anvari commented 3 years ago

Hi @qetza , Adding this as an enhancement request