Skip to content
Merged
Prev Previous commit
Next Next commit
EF Core instrumentation fix - Trailing space fix
  • Loading branch information
zivaninstana authored and martincostello committed Jun 24, 2025
commit b4e2966940bc24d2c4728bc9b4c83a56e6e421e3
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@ public override void OnEventWritten(string name, object? payload)
activity.Stop();
}

// from some reason this EF event comes before SQLClient SqlMicrosoftAfterExecuteCommand event
// From some reason this EF event comes before SQLClient SqlMicrosoftAfterExecuteCommand event
// EF span should not be parrent of any other span except SQLClient, because of that it can be closed safetly
// can result in a slightly strange timeline where the EF span finishes before its child SQLClient but based on EventSources it is true
// Can result in a slightly strange timeline where the EF span finishes before its child SQLClient but based on EventSources it is true
if (activity.Parent?.Source == EntityFrameworkActivitySource)
{
activity.Parent.Stop();
Expand Down