-
Notifications
You must be signed in to change notification settings - Fork 74
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 failed IO that are in a Kamon span #4394
Conversation
The non-CE |
@@ -62,14 +62,15 @@ object KamonMonitoringCats { | |||
component: String, | |||
tags: Map[String, Any] = Map.empty, | |||
takeSamplingDecision: Boolean = true | |||
)(io: IO[A]): IO[A] = | |||
)(io: IO[A]): IO[A] = { | |||
if (enabled) | |||
buildSpan(name, component, tags).bracketCase(_ => io) { | |||
case (span, ExitCase.Completed) => finishSpan(span, takeSamplingDecision) | |||
case (span, ExitCase.Error(cause)) => failSpan(span, cause, takeSamplingDecision) |
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 log may be better here ?
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.
I thought it would still make sense to log the errors even if Kamon is disabled 🤔
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.
Hum fair point, I think it is ok like this, we can have a refactoring later as it is not only about Kamon anymore.
There is a lot of changes at the moment, it is best to wait a bit before renaming more things
But maybe we should only log only the Rejection
s ?
Other wise we will be flooded if the database is down for example
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.
True, it requires to move Rejection
to the kernel if I'm not mistaken (which to me would actually make more sense than sourcing-psql anyway). Cf. latest commits
The merge-base changed after approval.
The merge-base changed after approval.
Closes #4393