-
Notifications
You must be signed in to change notification settings - Fork 138
Suppressing some logs from mcp inspector. #892
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
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.
Pull Request Overview
This PR addresses issue #861 by suppressing verbose logging from HTTP clients used by the MCP Inspector's health checks. The change reduces log noise by filtering out System.Net.Http.HttpClient logs at the LogicalHandler and ClientHandler levels.
- Adds a shared utility for suppressing health check HTTP client logging
- Integrates log suppression into the MCP Inspector resource builder
- Links the shared LoggingUtils.cs file into the MCP Inspector project
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Shared/LoggingUtils.cs | New utility class with method to suppress HTTP client logging for health checks |
| src/CommunityToolkit.Aspire.Hosting.McpInspector/McpInspectorResourceBuilderExtensions.cs | Adds call to suppress health check logging using the new utility |
| src/CommunityToolkit.Aspire.Hosting.McpInspector/CommunityToolkit.Aspire.Hosting.McpInspector.csproj | Links the shared LoggingUtils.cs file into the project |
|
|
||
| internal static class LoggingUtils | ||
| { |
Copilot
AI
Oct 13, 2025
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.
The LoggingUtils class and SuppressHealthCheckHttpClientLogging method are missing XML documentation comments. All public members should have XML doc comments according to project guidelines.
| internal static class LoggingUtils | |
| { | |
| /// <summary> | |
| /// Provides utility methods for configuring logging in the application. | |
| /// </summary> | |
| internal static class LoggingUtils | |
| { | |
| /// <summary> | |
| /// Suppresses logging for HTTP client requests made by a specific health check. | |
| /// </summary> | |
| /// <param name="services">The service collection to configure logging for.</param> | |
| /// <param name="healthCheckName">The name of the health check whose HTTP client logging should be suppressed.</param> |
Minimum allowed line rate is |
Fixes #861