ApplicationInsights-dotnet icon indicating copy to clipboard operation
ApplicationInsights-dotnet copied to clipboard

Incorrect parent ID for Azure Storage SDK dependency calls

Open DJ4ddi opened this issue 1 year ago • 0 comments

  • Packages:
    • Microsoft.ApplicationInsights.AspNetCore 2.22.0
    • Azure.Storage.Blobs 12.19.1
  • Runtime version: net6.0
  • Hosting environment: Azure App Service (linux container)

Describe the bug

When tracking Azure Storage calls from the Azure.Storage.Blobs SDK using the latest Application Insights SDK, some dependencies have the wrong parent ID. Specifically, items of type InProc | Microsoft.Storage are correct, but Azure blob are not. The incorrect ID seems to be random and doesn't appear anywhere else. The operation ID is correct.

You can find more details in #1915, which was supposedly fixed in AI 2.15. I received no response there, so I'm opening this ticket.

To Reproduce

Refer to the linked issue. Essentially, the steps are:

  • Create an ASP.NET Core project. Reference the AI SDK and Azure Storage Blobs SDK.
  • Add any storage SDK call in any request of the default controller created by the template.
  • Run a request on the endpoint that you added the storage call to. Observe how storage operations are tracked twice (once as InProc, once as Azure blob), but only one of them has the request ID as its parent ID.

DJ4ddi avatar Jan 04 '24 14:01 DJ4ddi