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

Emit the status code for responses, in addition to other stats #416

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

elliottt
Copy link
Contributor

@elliottt elliottt commented Aug 14, 2024

Emit the response status code when emitting stats about the request that was handled. Additionally, move the tracing span so that it covers all messages emitted for request handling, not just run_guest.

Here's a sample of what the new output looks like (when -v is passed):

2024-08-14T22:41:59.706626Z  INFO Listening on http://127.0.0.1:7676
2024-08-14T22:42:03.128146Z  INFO request{id=0}: handling request GET http://localhost:7676/
2024-08-14T22:42:03.128951Z  INFO request{id=0}: request completed using 1.1 MB of WebAssembly heap
2024-08-14T22:42:03.128999Z  INFO request{id=0}: request completed in 756µs
2024-08-14T22:42:03.129141Z  INFO request{id=0}: response status: 200

@elliottt elliottt requested review from acw and ulyssa August 14, 2024 22:47
Copy link
Contributor

@acw acw left a comment

Choose a reason for hiding this comment

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

that's helpful!

@elliottt elliottt merged commit a945b34 into main Aug 15, 2024
15 checks passed
@elliottt elliottt deleted the trevor/log-status-code branch August 15, 2024 00:27
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.

2 participants