opentelemetry-dotnet icon indicating copy to clipboard operation
opentelemetry-dotnet copied to clipboard

Changing Microsoft.Data.SqlClient diagnostic format

Open Wraith2 opened this issue 2 years ago • 11 comments

I contribute to Microsoft.Data.SqlClient and one of the recent issues we've had opened is to do with making the diagnostic information trim safe https://github.com/dotnet/SqlClient/issues/2184

Changing from using anonymous types to strong types is mostly just writing the types and getting it built which isn't too hard. I'm basing my changes on ones done for aspnet https://github.com/dotnet/aspnetcore/pull/11730 so they have public get-only properties and directly implemented enumerators, they are reflection free.

I am wondering how upstream callers like OTel will need to change (if at all) to consume the new classes and whether there is something I may be able to build into the new classes to assist or enable that. I'm also wondering if the order of properties or pairs is important and if changing them may cause problems. Are there things I can do to make life easier for consumers? Are there things to avoid?

Wraith2 avatar Nov 01 '23 14:11 Wraith2