Skip to content

Setup logging middleware#41

Merged
arangatang merged 3 commits intoaws:mainfrom
arangatang:setup_logging_middleware
Oct 7, 2025
Merged

Setup logging middleware#41
arangatang merged 3 commits intoaws:mainfrom
arangatang:setup_logging_middleware

Conversation

@arangatang
Copy link
Copy Markdown
Contributor

Summary

Changes

Please provide a summary of what's being changed
Adds some additional logging:

2025-10-07 17:32:21.298 [warning] [sigv4proxy] Log from MCP Server: 2025-10-07 17:32:21 | INFO | aws-mcp-proxy-middleware-logger | Processing message: event=request_start timestamp=2025-10-07T15:32:21.297848+00:00 method=tools/call type=request source=client payload_length=82 payload={"_meta":null,"name":"my_tool_name","arguments":{"my_kwarg_name":"my_kwarg_value"}} payload_type=CallToolRequestParams

User experience

Please share what the user experience looks like before and after this change
Simplifies debugging when looking at logs.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Is this a breaking change? (Y/N)

  • Yes
  • No

Please add details about how this change was tested.

  • Did integration tests succeed?
  • If the feature is a new use case, is it necessary to add a new integration test case?

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@arangatang arangatang requested a review from a team as a code owner October 7, 2025 15:44
@acmlau
Copy link
Copy Markdown
Contributor

acmlau commented Oct 7, 2025

How are we going to use the logging middleware differently than current logging?
And if it's not different, what is the benefit of using the middleware over the python logger?
Are there other use cases?

@arangatang
Copy link
Copy Markdown
Contributor Author

How are we going to use the logging middleware differently than current logging? And if it's not different, what is the benefit of using the middleware over the python logger? Are there other use cases?

Mainly this one logs every request to the mcp including payloads etc, so we can see for example for a tool call:
{"_meta":null,"name":"my_tool_name","arguments":{"my_kwarg_name":"my_kwarg_value"}}

This one does not replace other logging we have (like tool filtering etc) just adds some more info we can use for debugging.

@arangatang arangatang merged commit 31ff6ac into aws:main Oct 7, 2025
3 checks passed
@arangatang arangatang self-assigned this Oct 7, 2025
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.

4 participants