Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to System.Data.Odbc from wrapper and extensions #2928

Conversation

nr-ahemsath
Copy link
Member

Per team pairing last week, we should not add a reference to System.Data.Odbc to the Sql wrapper project nor the Extensions project with the helper code.

I initially went down a rabbit hole of using visibility bypasser to get the necessary data out of the OdbcCommand object. However, I eventually realized that we can treat the OdbcCommand object as an IDbCommand interface type and get almost everything we need directly that way. The one exception is the Driver string (needed to get the DatastoreVendor), which is not a part of the IDbCommand interface. However, it can be easily parsed from the ODBC connection string (and cached based on the full connection string).

@nr-ahemsath nr-ahemsath requested a review from a team as a code owner December 16, 2024 19:43
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 23.52941% with 13 lines in your changes missing coverage. Please review.

Please upload report for BASE (feature/netstandard-odbc-instrumentation@2a36a03). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...Relic.Agent.Extensions/Parsing/SqlWrapperHelper.cs 23.52% 13 Missing ⚠️
Additional details and impacted files
@@                             Coverage Diff                             @@
##             feature/netstandard-odbc-instrumentation    #2928   +/-   ##
===========================================================================
  Coverage                                            ?   81.21%           
===========================================================================
  Files                                               ?      466           
  Lines                                               ?    29642           
  Branches                                            ?     3297           
===========================================================================
  Hits                                                ?    24074           
  Misses                                              ?     4776           
  Partials                                            ?      792           
Flag Coverage Δ
Agent 82.11% <23.52%> (?)
Profiler 73.13% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...Relic.Agent.Extensions/Parsing/SqlWrapperHelper.cs 33.33% <23.52%> (ø)

@nr-ahemsath nr-ahemsath merged commit 644555a into feature/netstandard-odbc-instrumentation Dec 17, 2024
90 of 93 checks passed
@nr-ahemsath nr-ahemsath deleted the featurework/remove-system-net-odbc-reference branch December 17, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants