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

Log canceled client requests at info level #4947

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

nwt
Copy link
Member

@nwt nwt commented Dec 19, 2023

"zed serve" logs canceled client requests (specifically, those that end due to a context.Canceled error appearing to originate from the request context) at warn level, which includes a stack trace, with an alarming message.

{
  "level":"warn",
  "ts":1702997509.358625,
  "logger":"core",
  "msg":"Error",
  "request_id":"2ZlXC74Oeg2zEXQXX8ol8Ma1Lyd",
  "status":500,
  "error":"context canceled",
  "stacktrace":"..."
}

Change the level to info, thereby omitting the stack trace, and change the message to one less alarming.

{
  "level":"info",
  "ts":1702998051.5594501,
  "logger":"core",
  "msg":"Request context canceled",
  "request_id":"2ZlYICXG8lrypWxyIxUBoM84qjT"
}

Closes #4941.

"zed serve" logs canceled client requests (specifically, those that end
due to a context.Canceled error appearing to originate from the request
context) at warn level, which includes a stack trace, with an alarming
message.

    {
      "level":"warn",
      "ts":1702997509.358625,
      "logger":"core",
      "msg":"Error",
      "request_id":"2ZlXC74Oeg2zEXQXX8ol8Ma1Lyd",
      "status":500,
      "error":"context canceled",
      "stacktrace":"..."
    }

Change the level to info, thereby omitting the stack trace, and change
the message to one less alarming.

    {
      "level":"info",
      "ts":1702998051.5594501,
      "logger":"core",
      "msg":"Request context canceled",
      "request_id":"2ZlYICXG8lrypWxyIxUBoM84qjT"
    }
@nwt nwt merged commit 4c7de04 into main Dec 19, 2023
3 checks passed
@nwt nwt deleted the log-canceled-client-request-at-info branch December 19, 2023 17:30
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.

Canceled operation causes log message with HTTP 500 and stack dump
2 participants