-
Couldn't load subscription status.
- Fork 316
Adding EventSource to NetFx #399
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
Conversation
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/DataException.cs
Outdated
Show resolved
Hide resolved
|
What consumes the messages that the BID tracing produced? There's a lot of information embedded in the strings and i'm not sure if it needs to remain in that format or if it could be split out as event properties so you can use them for filtering or grouping in consuming tools like perfview. I'm not a big fan of the field access for the event source instance |
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Server/SmiEventSink_Default.cs
Outdated
Show resolved
Hide resolved
|
I had a read through https://github.com/Microsoft/dotnet-samples/blob/master/Microsoft.Diagnostics.Tracing/EventSource/docs/EventSource.md earlier and I think the new |
|
@Wraith2 the |
Excellent, missed that then 😁
Yeah, and it is. But it's a guideline and not a requirement and code is for humans to read so if the computer doesn't like it we can shut it up but the pattern of calling The doc I linked is the design/usage documentation from the original implementation. It was made for corefx and backported to netfx so the guidance there is first party and quite useful I found. |
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 haven't gotten all the way through yet, but wanted to post what I've done so far. In general, it looks good.
I generally agree with Wraith2 on naming it Log instead of _log for readability. I think we can suppress the naming violation.
As Wraith2 also mentioned, You need to surround _log.* calls with an if (_log.IsTraceEnabled()) block everywhere you are passing in a string that will be formatted before it is passed into the trace function to avoid the performance penalty of formatting and allocating a new string during the function call.
...Client/netfx/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationTimeoutRetryHelper.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommandSet.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/EventSource/EventSourceTest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/EventSource/EventSourceTest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlClientLogger.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlDataReaderSmi.cs
Show resolved
Hide resolved
…nto EventSource # Conflicts: # src/Microsoft.Data.SqlClient/tests/ManualTests/EventSource/EventSourceTest.cs
src/Microsoft.Data.SqlClient/tests/ManualTests/EventSource/EventSourceTest.cs
Outdated
Show resolved
Hide resolved
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.
Approved with Suggestions.
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.
Need more changes.
This PR removes references to Bid class and replaces them with references to SqlClientEventSource.