When starting our applications, we get a warning Failed to load the instrumentation modules status because the Kanela agent is not available (once). Despite the message, metrics seem to be working fine.
The warning is logged in kamon.status.InstrumentationStatus#create
case t: Throwable =>
if (warnIfFailed || true) {
t match {
case _: ClassNotFoundException =>
_logger.warn(
"Failed to load the instrumentation modules status because the Kanela agent is not available"
)
Both places calling this method pass in warnIfFailed = false, but this is ignored because of the || true. I'm assuming this is just debugging code that made it into a release (in commit c06913a) @ivantopo?
diff --git a/core/kamon-core/src/main/scala/kamon/status/InstrumentationStatus.scala b/core/kamon-core/src/main/scala/kamon/status/InstrumentationStatus.scala
index fe54ffa3..fea6b0c0 100644
--- a/core/kamon-core/src/main/scala/kamon/status/InstrumentationStatus.scala
+++ b/core/kamon-core/src/main/scala/kamon/status/InstrumentationStatus.scala
@@ -65,7 +65,7 @@ object InstrumentationStatus {
Status.Instrumentation(present, Option(kanelaVersion), modules.toSeq)
} catch {
case t: Throwable =>
- if (warnIfFailed || true) {
+ if (warnIfFailed) {
t match {
case _: ClassNotFoundException =>
_logger.warn(
When starting our applications, we get a warning Failed to load the instrumentation modules status because the Kanela agent is not available (once). Despite the message, metrics seem to be working fine.
The warning is logged in kamon.status.InstrumentationStatus#create
Both places calling this method pass in
warnIfFailed = false, but this is ignored because of the|| true. I'm assuming this is just debugging code that made it into a release (in commit c06913a) @ivantopo?