Skip to content

Conversation

johnnypham
Copy link
Contributor

@johnnypham johnnypham commented Jul 14, 2020

This PR uses the existing EventSource implementation to enable event tracing in SNI.dll. Events must be captured using a tool like Xperf.

Tracing can be enabled by sending a command to SqlClientEventSource:
// Enables trace events:
EventSource.SendCommand(eventSource, (EventCommand)8192, null);

// Enables flow events:
EventSource.SendCommand(eventSource, (EventCommand)16384, null);

// Enables both trace and flow events:
EventSource.SendCommand(eventSource, (EventCommand)(8192 | 16384), null);

@cheenamalhotra cheenamalhotra added this to the 2.1.0-preview1 milestone Jul 14, 2020
Copy link
Member

@cheenamalhotra cheenamalhotra left a comment

Choose a reason for hiding this comment

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

Rest everything looks good to me.

@cheenamalhotra cheenamalhotra merged commit cff40d0 into dotnet:master Aug 21, 2020
@johnnypham johnnypham deleted the event-tracing branch August 25, 2020 15:43
TrayanZapryanov pushed a commit to TrayanZapryanov/SqlClient that referenced this pull request Aug 31, 2020
TrayanZapryanov added a commit to TrayanZapryanov/SqlClient that referenced this pull request Aug 31, 2020
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.

5 participants