Bug #118469 Connection attributes for Connector/NET are incomplete/incorrect
Submitted: 17 Jun 9:38 Modified: 17 Jun 10:33
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:9.3 OS:Any
Assigned to: CPU Architecture:Any
Tags: connection attributes

[17 Jun 9:38] Daniël van Eeden
Description:
Page: https://dev.mysql.com/doc/refman/9.3/en/performance-schema-connection-attribute-tables.htm...

This page lists this:
 MySQL Connector/NET defines these attributes:
    _client_version: The client library version.
    _os: The operating system (for example, Linux, Win64).
    _pid: The client process ID.
    _platform: The machine platform (for example, x86_64).
    _program_name: The client name.
    _thread: The client thread ID (Windows only). 

But Wireshark shows this:
 Connection Attributes
    Connection Attributes length: 184
    Connection Attribute - _client_name: mysql-connector-net
    Connection Attribute - _client_licence: GPL-2.0
    Connection Attribute - _pid: 615309
    Connection Attribute - _client_version: 9.3.0.0
    Connection Attribute - _os: Unix
    Connection Attribute - _thread: 615309
    Connection Attribute - _platform: x86_32
    Connection Attribute - _os: Unix-6.14
    Connection Attribute - _framework: .NETCoreApp,Version=v9.0

How to repeat:
Compare docs with network packets

Suggested fix:
Add to the docs:
 _client_name
 _client_license
 _framework

Update _thread to remove the "Windows only" note.

For _os I would expect a single attribute with "Linux" as value. However there are two connections attributes with the same name, but slightly different values. One says Unix instead of the expected Linux and the other one adds the Linux kernel version resulting in Unix-6.14

For some things like _client_name and _client_license it might be best to only list them once if they are set by all (or most) connectors. And if not then it might be good to list the actual value(s) that are to be expected (especially for _client_name)
[17 Jun 9:42] Daniël van Eeden
Addition host info:

My .csproj file has this:
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net9.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="MySql.Data" Version="9.3.0" />
  </ItemGroup>

</Project>

$ dotnet --info
.NET SDK:
 Version:           9.0.106
 Commit:            3d441471e6
 Workload version:  9.0.100-manifests.431e9f8c
 MSBuild version:   17.12.35+3d441471e

Runtime Environment:
 OS Name:     fedora
 OS Version:  42
 OS Platform: Linux
 RID:         fedora.42-x64
 Base Path:   /usr/lib64/dotnet/sdk/9.0.106/

....
[17 Jun 10:33] MySQL Verification Team
Hello Daniël,

Thank you for the report and feedback.

regards,
Umesh