Skip to content
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

Add environment variables to enable service logging in the MSSQL and Kusto kernels #2608

Merged
merged 4 commits into from
Jan 10, 2023

Conversation

corivera
Copy link
Member

Currently we don't have any way to collect logs from the SQL and Kusto service processes if there are any issues. This change adds an environment variable to provide a log file to dump traces to for those services. Tracing is only enabled if the environment variables are set.

@@ -35,7 +35,15 @@ public async Task<Kernel> CreateKernelAsync(string kernelName)

var connectionDetails = await BuildConnectionDetailsAsync();

var client = new ToolsServiceClient(PathToService);
var serviceArgs = $"--parent-pid {Environment.ProcessId}";
Copy link
Member Author

Choose a reason for hiding this comment

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

This parent-pid argument here is the ID of the current process, so that we can close the service process after the parent process has exited. This was added to the SQL kernel a while ago, but was missed in the Kusto kernel.

@jonsequitur jonsequitur enabled auto-merge (squash) January 10, 2023 22:01
@jonsequitur jonsequitur merged commit 02e9bb6 into dotnet:main Jan 10, 2023
@corivera corivera deleted the corivera/sqlToolsLogging branch January 10, 2023 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants