MySql.Data.OpenTelemetry 9.1.0

Prefix Reserved
dotnet add package MySql.Data.OpenTelemetry --version 9.1.0                
NuGet\Install-Package MySql.Data.OpenTelemetry -Version 9.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MySql.Data.OpenTelemetry" Version="9.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MySql.Data.OpenTelemetry --version 9.1.0                
#r "nuget: MySql.Data.OpenTelemetry, 9.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MySql.Data.OpenTelemetry as a Cake Addin
#addin nuget:?package=MySql.Data.OpenTelemetry&version=9.1.0

// Install MySql.Data.OpenTelemetry as a Cake Tool
#tool nuget:?package=MySql.Data.OpenTelemetry&version=9.1.0                

About

MySQL provides connectivity for client applications developed in .NET compatible programming languages with MySQL Connector/NET through a series of packages.

MySql.Data.OpenTelemetry enables telemetry capabilities. It is compatible with .NET 6.0+ and must be used alongside the MySql.Data package. An OpenTelemetry SDK is required.

More information at [MySQL Connector/NET documentation] (https://dev.mysql.com/doc/connector-net/en/).

How to use

    //create the tracer provider and add Connector/NET as a source from telemetry data.
    using var tracerProvider = Sdk.CreateTracerProviderBuilder()
            .AddConnectorNet()
            .ConfigureResource(resource => resource.AddService("connector-net"))
            .Build();

    //use MySql.Data as usual, the internal implementation of OpenTelemetry is now enabled.
    MySql.Data.MySqlClient.MySqlConnection myConnection;
    string myConnectionString;
    //set the correct values for your server, user, password and database name
    myConnectionString = "server=127.0.0.1;uid=root;pwd=12345;database=test";

    try
    {
      myConnection = new MySql.Data.MySqlClient.MySqlConnection(myConnectionString);
      //open a connection
      myConnection.Open();

      // create a MySQL command and set the SQL statement with parameters
      MySqlCommand myCommand = new MySqlCommand();
      myCommand.Connection = myConnection;
      myCommand.CommandText = @"SELECT * FROM clients WHERE client_id = @clientId;";
      myCommand.Parameters.AddWithValue("@clientId", clientId);

      // execute the command and read the results
      using var myReader = myCommand.ExecuteReader()
      {
        while (myReader.Read())
        {
          var id = myReader.GetInt32("client_id");
          var name = myReader.GetString("client_name");
          // ...
        }
      }
      myConnection.Close();
    }
    catch (MySql.Data.MySqlClient.MySqlException ex)
    {
      MessageBox.Show(ex.Message);
    }

Licensing

Please refer to files README and LICENSE, available in the Connector/NET GitHub repository, and Legal Notices in documentation for further details.

Security

Oracle values the independent security research community and believes that responsible disclosure of security vulnerabilities helps us ensure the security and privacy of all our users. Please refer to the security guidelines document for additional information.

Contributing

We greatly appreciate feedback from our users, including bug reports and code contributions. Your input helps us improve, and we thank you for any issues you report or code you contribute. Please refer to the contributing guidelines document for additional information.

Additional Resources

For more information about this and other MySQL products, please visit MySQL Contact & Questions.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MySql.Data.OpenTelemetry:

Package Downloads
Grafana.OpenTelemetry.Base

Minimal Grafana distribution of OpenTelemetry .NET

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.1.0 9,639 10/15/2024
9.0.0 58,736 7/1/2024
8.4.0 25,953 4/30/2024
8.3.0 395,776 1/16/2024
8.2.0 173,318 10/25/2023
8.1.0 41,584 7/18/2023