This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
Runtime version (e.g. net462, net48, netcoreapp3.1, net6.0 etc. You can
find this information from the *.csproj file):
Tested on net6.0 and net7.0. Applicable to all packages.
Is this a feature request or a bug?
[ ] Feature Request
[x] Bug
What is the expected behavior?
Library supports both 8.0.32 and older packages.
What is the actual behavior?
Unhandled exception. System.MissingMethodException: Method not found: 'Void MySql.Data.MySqlClient.MySqlConnectionStringBuilder..ctor(System.String)'.
at OpenTelemetry.Instrumentation.MySqlData.MySqlDataInstrumentation.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
at MySql.Data.MySqlClient.MySqlTrace.LogError(Int32 id, String msg)
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
at TestApplication.MySqlData.Program.Main(String[] args) in C:\GitHub\opentelemetry-dotnet-instrumentation\test\test-applications\integrations\TestApplication.MySqlData\Program.cs:line 35
at TestApplication.MySqlData.Program.<Main>(String[] args)
The repro project you share with us is complex. We can't investigate custom
projects, so don't point us to such, please.
If we can not reproduce the behavior you're reporting.
Issue with OpenTelemetry.Instrumentation.MySqlData
List of
allrelevant 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 can find this information from the*.csproj
file):net6.0
andnet7.0
. Applicable to all packages.Is this a feature request or a bug?
What is the expected behavior?
Library supports both 8.0.32 and older packages.
What is the actual behavior?
Additional Context
Issue occurs because public API for was changed https://github.com/mysql/mysql-connector-net/commit/79fb50bb9d377a21547f3660c090e3b6d14cc068#diff-66e8cb2ee0ba86ab5ca464b2d03b24f1f3bdb3eeb3d2040c2bda57f1e37c7065. Instrumentation cannot find old API for in https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/7d62f100c8d7a86204a18e25cf5401da119da5ac/src/OpenTelemetry.Instrumentation.MySqlData/MySqlDataInstrumentation.cs#L57-L62 It works correctly if you compile
OpenTelemetry.Instrumentation.MySqlData
with newer version as a reference (default parameter is correctly set).Found by Automatic Instrumentation tests.