tumblr / colossus

I/O and Microservice library for Scala
Apache License 2.0
1.14k stars 96 forks source link

Logged error messages doesn't include the type of the errors (version 0.10) #633

Closed tarossi closed 6 years ago

tarossi commented 6 years ago

Since upgrading from 0.9 to 0.10 we're noticing the following kind of errors in our logs:

2017-11-13T15:15:23.623Z ERROR [our-server-dispatcher-11] colossus.protocols.http.HttpServiceHandler - Error processing request: HttpRequest(ParsedHead(Post /our-endpoint 1.1,[content-type:application/json connection:keep-alive host:our-host content-length:551]),{...some JSON...})

Notice the error type isn't included in the message. After some research we concluded that those mysterious errors were just good old DroppedReplyExceptions (which on some circumstances are considered normal), the difference being that colossus isn't telling it anymore.

Having a quick look(*) at colossus code we noticed that log messages are constructed in https://github.com/tumblr/colossus/blob/2604b1a9c034032ef400f0ca407efde8f25f3425/colossus/src/main/scala/colossus/service/ServiceServer.scala#L114 which relies on https://github.com/tumblr/colossus/blob/2604b1a9c034032ef400f0ca407efde8f25f3425/colossus/src/main/scala/colossus/service/ServiceServer.scala#L135 So, request seems to be the only thing that gets written (put aside the stack trace that will not be included for dropped replies) which misses altogether the type of the error.

(*) So we may be wrong about it.

Thanks in advance.

benblack86 commented 6 years ago

The fix will be in 0.11.0