-
Notifications
You must be signed in to change notification settings - Fork 387
Make DiagnosticsClient.StartEventPipeSessionAsync public #4394
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
Make DiagnosticsClient.StartEventPipeSessionAsync public #4394
Conversation
This allows user code to pass a cancellation token without wrapping the call to StartEventPipeSession() in Task.Run() or similar. Resolves dotnet#3727.
| /// </returns> | ||
| internal Task<EventPipeSession> StartEventPipeSessionAsync(IEnumerable<EventPipeProvider> providers, bool requestRundown, int circularBufferMB, CancellationToken token) | ||
| public Task<EventPipeSession> StartEventPipeSessionAsync(IEnumerable<EventPipeProvider> providers, bool requestRundown, | ||
| int circularBufferMB = DefaultCircularBufferMB, CancellationToken token = default) |
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.
Made circularBufferMB optional here consistent with the sync overload and extracted the default value into a constant to avoid duplicating it. This required making token optional as well.
hoyosjs
left a comment
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.
mikelle-rogers
left a comment
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.
@loop-evgeny, will you please document this now that it is public?
It can be documented here: https://github.com/dotnet/docs/blob/main/docs/core/diagnostics/microsoft-diagnostics-netcore-client.md
These are being made public in dotnet/diagnostics#4394
These are being made public in dotnet/diagnostics#4394
* Document DiagnosticsClient.StartEventPipeSessionAsync methods These are being made public in dotnet/diagnostics#4394 * Update docs/core/diagnostics/microsoft-diagnostics-netcore-client.md Co-authored-by: mikelle-rogers <45022607+mikelle-rogers@users.noreply.github.com> * Add StartEventPipeSessionAsync to method summary list --------- Co-authored-by: mikelle-rogers <45022607+mikelle-rogers@users.noreply.github.com>
This allows user code to pass a cancellation token without wrapping the call to StartEventPipeSession() in Task.Run() or similar. Resolves #3727.