Skip to content

Conversation

@machavan
Copy link
Contributor

@machavan machavan commented Nov 20, 2025

Description:
By enhancing telemetry for SQL drivers, we can achieve a more nuanced understanding of the operating environments in use. This capability enables us to make strategic decisions about testing and support, ultimately improving our efficiency and reducing costs. Adopting a structured and extensible approach to telemetry collection will ensure we gather the most relevant and useful data, facilitating continuous improvement in our processes.
The user agent information will be transported to the SQL Server via a new TDS Feature Extension (FE) in the LOGIN7 TDS message:

Name: USERAGENT
Identifier: 0x10
Data Length: max 256 bytes
Data: + UCS-2 encoded String

User agent string format:

<user agent version>|<driver type>|<driver version>|<os type>|<os version>|<architecture>|<runtime>

Sample

1|MS-JDBC|13.2.0|Windows|Windows 10.0.22600.0|amd64|OpenJDK 64-Bit Server VM 21.0.4+7-LTS

Testing:
-Added a new test to validate the generated user agent string max length
-Verified with SQL databases that are both disabled and enabled with accepting and handling this new user agent FE.
-All existing test cases exercise this code path since each login packet will include this new feature extension.

@machavan machavan added this to the 13.3.1 milestone Nov 20, 2025
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 75.51020% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.39%. Comparing base (8f3ddc4) to head (db7880b).

Files with missing lines Patch % Lines
.../microsoft/sqlserver/jdbc/SQLServerConnection.java 77.08% 7 Missing and 4 partials ⚠️
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2848      +/-   ##
============================================
+ Coverage     56.35%   56.39%   +0.04%     
- Complexity     4531     4550      +19     
============================================
  Files           151      151              
  Lines         34445    34494      +49     
  Branches       5741     5751      +10     
============================================
+ Hits          19410    19454      +44     
- Misses        12415    12421       +6     
+ Partials       2620     2619       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@muskan124947
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

muskan124947
muskan124947 previously approved these changes Nov 20, 2025
divang
divang previously approved these changes Nov 20, 2025
Ananya2
Ananya2 previously approved these changes Nov 20, 2025
Copy link
Collaborator

@David-Engel David-Engel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment. Otherwise, LGTM.

@machavan machavan dismissed stale reviews from Ananya2, divang, and muskan124947 via d919144 November 26, 2025 08:14
muskan124947
muskan124947 previously approved these changes Nov 26, 2025
Ananya2
Ananya2 previously approved these changes Nov 26, 2025
divang
divang previously approved these changes Nov 26, 2025
@machavan machavan dismissed stale reviews from divang, Ananya2, and muskan124947 via ab3cc28 November 27, 2025 11:32
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.

6 participants