Azure / Azure/azure-functions-host

SQL Server dependency tracking stops working when Microsoft.ApplicationInsight is explicitely referenced

Open
#7,681 5 comments 0 reactions 0 assignees View on GitHub
Needs: Attention :wave:
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

With .NET Core 3.1 Function App dependency calls to SQL Server are not tracked if NuGet Microsoft.ApplicationInsight is referenced in the project. Tested with Microsoft.ApplicationInsight v. 2.16.0 and 2.18.0.

#### Repro steps

1. Create a new Function App .NET Core 3.1 project in VS 2019 with HttpTrigger
2. In the implementation of the (only) function perform a SqlConnection and run a SqlCommand.
3. Set a valid APPINSIGHTS_INSTRUMENTATIONKEY in local.settings.json
4. Build and execute => the outbound SQL dependency is tracked
5. Add NuGet package reference Microsoft.ApplicationInsight to the project
6. Build and run again => the outbound SQL dependency is no longer tracked, while outbound HTTP calls are still tracked.

References:
```


```

#### Expected behavior

SQL dependencies must always be tracked, regardless the fact Microsoft.ApplicationInsight is explicitely referenced or not.

Contributor guide

Open the contributing guide

Research direction

Reproduce the .NET Core 3.1 Function App described in the steps, first without and then with an explicit Microsoft.ApplicationInsight reference. Compare SQL dependency tracking while confirming outbound HTTP tracking remains intact; done means SQL dependencies are tracked in both builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.