You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenTelemetry.Instrumentation.SqlClient 1.0.0-rc9.14, probably any older have the same problem.
Microsoft.Data.SqlClient 3.1.2 (or other from this version)
Runtime version (e.g. net462, net48, netcoreapp3.1, net6.0 etc. You can
find this information from the *.csproj file):
net462 (.NET (Core) works fine).
Symptom
What is the expected behavior?
Spans/Activities are emitted also for Microsoft.Data.SqlClient 3.1.2
What is the actual behavior?
What did you see instead?
Spans/Activaties are not created, following events are emitted
[2023-02-28T11:12:20.6189013Z] [Warning] EventSource=OpenTelemetry-Instrumentation-SqlClient, Message=Payload is invalid in event 'OnBeginExecute' from handler 'SqlEventSourceListener', span will not be recorded.
[2023-02-28T11:12:20.6610449Z] [Warning] EventSource=OpenTelemetry-Instrumentation-SqlClient, Message=Payload is invalid in event 'OnEndExecute' from handler 'SqlEventSourceListener', span will not be recorded.
- For "Microsoft-AdoNet-SystemData" v1.0: [3] CommandText = CommandType == CommandType.StoredProcedure ? CommandText : string.Empty; (so it is set for only StoredProcedure command types)
Bug Report
List of all OpenTelemetry NuGet
packages and version that you are
using (e.g.
OpenTelemetry 1.0.2
):Runtime version (e.g.
net462
,net48
,netcoreapp3.1
,net6.0
etc. You canfind this information from the
*.csproj
file):Symptom
What is the expected behavior?
Spans/Activities are emitted also for Microsoft.Data.SqlClient 3.1.2
What is the actual behavior?
What did you see instead?
Spans/Activaties are not created, following events are emitted
Reproduce
(It takes some time)
nuke Workflow
It can be also reproduce more granularly
nuke BuildTracer
IntegrationTests.SqlClientMicrosoftTests
from VisualStrudio.Additional Context
Detected by extended set for Automatic Instrumentation with different versions of libraries.
Issue due to differences between supported/non-supported payload
Supported: https://github.com/dotnet/SqlClient/blob/f4568ce68da21db3fe88c0e72e1287368aaa1dc8/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs#L6641
Non-supported: https://github.com/dotnet/SqlClient/blob/3.1-servicing/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs#L6548
Problematic code:
opentelemetry-dotnet/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlEventSourceListener.netfx.cs
Lines 106 to 126 in 9dd54d7
Similar issue probably for the
EndEvent
.The text was updated successfully, but these errors were encountered: