Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

SQL Dependency has wrong parrentId #778

Closed
stefrostik opened this issue Oct 25, 2018 · 5 comments
Closed

SQL Dependency has wrong parrentId #778

stefrostik opened this issue Oct 25, 2018 · 5 comments

Comments

@stefrostik
Copy link

Repro Steps

  1. AddApplicationInsightsTelemetry to youe service
  2. Add call to some API, SQL Server

Actual Behavior

Requests logged correctly, API call is child,
SQL Server call is NOT a child of root request. It is on the same level with request
image
image

Expected Behavior

SQL Server dependency should have request as parrent
image

NOTE: workaround is to store RequestId in Activity when request starts, and set parrentId in sql dependency in custom telemetryProccessor

Version Info

SDK Version : Microsoft.ApplicationInsights.AspNetCore Version=2.3.0 - 2.5.1
.NET Version : netcoreapp2.1

@lmolkova
Copy link
Member

thanks for reporting this.
Would you mind sharing the following info?

  1. Microsoft.ApplicationInsights.AspNetCore Version=2.3.0 - 2.5.1

You've upgraded the SDK to 2.5.1?
Did it repro on 2.3.0?

  1. Incoming request in your case, is it ServiceBus message processing?
  2. SQL dependency - it is tracked automatically or manually?
  3. Please share request telemetry and dependency telemetries operation id, parent id and Id.

@stefrostik
Copy link
Author

  1. Issue exists on all versions from 2.3.0 to 2.5.1 (havent checked older versions)
  2. Yes, it is service bus request
  3. It is tracked automatically
  4. Do you need real opertion Ids? not sure if I can share them due to security policy

@lmolkova
Copy link
Member

Do you need real opertion Ids? not sure if I can share them due to security policy

They are random and do not have any personal or sensitive information. If your policies do not allow to share them publically, could you consider sending them over email to me? (my email is in the profile).

you may run query that returns only Ids and won't reveal any information to me
e.g.

union requests | union dependencies| union traces
| where operation_Id == "your operation id"
| project operation_Id, id, operation_ParentId, name

Another option could be a small repro app.

Also, where do you make db call? Is it during message processing within a processing handler?

@ThiemeNL
Copy link

I think I have the same issue, see my stackoverflow question: https://stackoverflow.com/questions/53322973/disable-ef-core-migration-verification-query
The operation_id gets sticky once I enable the SQL dependecy tracking.

@cijothomas
Copy link
Contributor

Closing as this is fixed in linked PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants