-
Notifications
You must be signed in to change notification settings - Fork 438
Introducing Performance Loggers #2706
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2706 +/- ##
============================================
+ Coverage 51.49% 51.60% +0.10%
- Complexity 4060 4077 +17
============================================
Files 149 151 +2
Lines 34136 34331 +195
Branches 5700 5727 +27
============================================
+ Hits 17580 17718 +138
- Misses 14090 14117 +27
- Partials 2466 2496 +30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
.getProperty(SQLServerDriverStringProperty.USER.toString()); | ||
|
||
if (null != managedIdentityClientId && !managedIdentityClientId.isEmpty()) { | ||
try (PerformanceLog.Scope fedAuthScope = PerformanceLog.createScope(PerformanceLog.perfLoggerConnection, traceID, PerformanceActivity.TOKEN_ACQUISITION)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would actually put this in onFedAuthInfo, so that the scope includes calls to any access token callbacks (but not the last two lines in there that send the token to the server).
Description:
This is a foundational change for introducing performance loggers which can be used tracking performance of various activities within the mssql-jdbc driver e.g. connection time, login time, token acquisition time etc.
A new java.util.Logging logger
com.microsoft.sqlserver.jdbc.PerformanceMetrics.Connection
is introduced here which can be subscribed to by applications.More loggers such as
com.microsoft.sqlserver.jdbc.PerformanceMetrics.Statement
will be introduced in future.Various performance activities to be tracked are defined in a PerformanceActivity Enum which will be amended with new additions in future.
Testing:
-Manual testing of new logger functionality.
-All existing tests ensure testing of newly added code.