我想在lagom中使用use kamon。
我在我的应用程序和kanela-plugin中添加了kamon包,根据文档,kanela应该会自动启动,检测应该会开始,但什么都不会发生。
此外,我想使用日志报告器,但我不能找到“工厂”在配置文件中提供使用kamon-log-reporter模块。
我添加了这个插件:
addSbtPlugin("io.kamon" % "sbt-kanela-runner" % "2.0.3")这是我的build.sbt文件:
val kamon = "io.kamon" %% "kamon-bundle" % "2.0.4"
val logReporter = "io.kamon" %% "kamon-log-reporter" % "0.6.8"
lazy val `root` = (project in file("."))
.enablePlugins(JavaAgent)
.aggregate(`root-api`, `root-impl`)
.settings(libraryDependencies in ThisBuild ++= Seq(macwire,kamon,logReporter))
.settings(
credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
)
.settings(
javaOptions in Universal += "-DKamon.auto-start=true",
)这是我的日志记录器会议:-
kamon{
modules{
enabled = true
name ="LOG REPORTER"
description = "Logs the metrics"
factory = "" //don't know what to add here
}
}发布于 2019-12-06 09:12:53
kamon-log-reporter很旧,并且还没有更新以跟上Kamon (1.0和2.0)的最新变化。你不会有任何运气让它与sbt-kanela-runner (这是一个全新的)一起工作。
相反,可以尝试使用kamon-logback -它提供了有关如何记录跟踪ID的说明。要查找有关特定跟踪的其他信息,您必须同时运行zipkin或jaeger之类的程序(或者使用云服务,如Kamon APM);我不知道是否还有记者输出文本。
https://stackoverflow.com/questions/59193470
复制相似问题