-
Notifications
You must be signed in to change notification settings - Fork 163
[RORDEV-1863] RequestId aware logging #1188
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
base: develop
Are you sure you want to change the base?
Conversation
# Conflicts: # es67x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es70x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es710x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es711x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es714x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es716x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es717x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es72x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es73x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es74x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es77x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es78x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es79x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es80x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es810x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es811x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es812x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es813x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es814x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es815x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es816x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es818x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es81x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es82x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es83x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es84x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es85x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es87x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es88x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es89x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es90x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es91x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala # es92x/src/main/scala/tech/beshu/ror/es/services/RestClientAuditSinkService.scala
| import cats.implicits.* | ||
| import monix.eval.Task | ||
| import org.apache.logging.log4j.scala.Logging | ||
| import tech.beshu.ror.utils.RequestIdAwareLogging |
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.
Overview of changes:
- everywhere changed
org.apache.logging.log4j.scala.Loggingtotech.beshu.ror.utils.RequestIdAwareLogging loggerrequires implicit instance oftrait HasRequestIdin scope- all implementations of
trait RequestContext,BlockContext,RequestId,ResponseContextextendHasRequestId - in situations, where the request id is not available, the
noRequestIdLoggeris used
That way we known, that all logs either have the request id, or are using easily-searchable noRequestIdLogger
| rorEsConfig: ReadonlyRestEsConfig) | ||
| (implicit environmentConfig: EnvironmentConfig) | ||
| extends ActionFilter with Logging { | ||
| extends ActionFilter with RequestIdAwareLogging { |
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 changes in modules are 99% the same, with some minor module-specific differences
No description provided.