Kamon.io looks really promising, but it's not usable in current form for me :)
I build artifacts with sbt-assembly. There are 2 problems:
1) Multiple aop.xml files. sbt-assebmly uses deduplicate strategy:
[error] (*:assembly) deduplicate: different file contents found in the following:
[error] /home/ubuntu/.ivy2/cache/kamon/kamon-core/jars/kamon-core-0.0.14.jar:META-INF/aop.xml
[error] /home/ubuntu/.ivy2/cache/kamon/kamon-spray/jars/kamon-spray-0.0.14.jar:META-INF/aop.xml
[error] /home/ubuntu/.ivy2/cache/kamon/kamon-testkit/jars/kamon-testkit-0.0.14.jar:META-INF/aop.xml
I'm not AspectJ expert, so I'm not sure what is the solution here. Ideally I want sbt-assembly to be smart, so it can merge these files and get perfect XML as a result. But now it can only merge it in a very simple way, one by one, so we have incorrect XML.
2) reference.conf. For *.conf files sbt-assembly uses concat strategy. As a result (part of compiled reference conf with Akka, Spray and Kamon.io):
trace {
ask-pattern-tracing = off
}
}kamon {
spray {
include-trace-token-header = true
trace-token-header-name = "X-Trace-Token"
}
}######################################
# Akka Testkit Reference Config File #
######################################
And error:
Caused by: com.typesafe.config.ConfigException$Parse: reference.conf: 1456: Expecting end of input or a comma, got 'kamon' (if you intended 'kamon' to be part of the value for 'kamon', try enclosing the value in double quotes)
Solution: just add a comment in the beginning or empty line in the end of the every reference.conf file.
Anyway, thanks for cool library ;-)
1) Multiple aop.xml files. sbt-assebmly uses deduplicate strategy:
[error] (*:assembly) deduplicate: different file contents found in the following:
[error] /home/ubuntu/.ivy2/cache/kamon/kamon-core/jars/kamon-core-0.0.14.jar:META-INF/aop.xml
[error] /home/ubuntu/.ivy2/cache/kamon/kamon-spray/jars/kamon-spray-0.0.14.jar:META-INF/aop.xml
[error] /home/ubuntu/.ivy2/cache/kamon/kamon-testkit/jars/kamon-testkit-0.0.14.jar:META-INF/aop.xml
I'm not AspectJ expert, so I'm not sure what is the solution here. Ideally I want sbt-assembly to be smart, so it can merge these files and get perfect XML as a result. But now it can only merge it in a very simple way, one by one, so we have incorrect XML.
<!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
<aspectj>
<aspects>
<!-- Actors -->
<aspect name="akka.instrumentation.RepointableActorRefTraceContextMixin"/>
<aspect name="akka.instrumentation.SystemMessageTraceContextMixin"/>
<aspect name="akka.instrumentation.ActorSystemMessagePassingTracing"/>
<aspect name="akka.instrumentation.EnvelopeTraceContextMixin"/>
<aspect name="akka.instrumentation.BehaviourInvokeTracing"/>
<aspect name="kamon.instrumentation.ActorLoggingTracing"/>
<!-- Futures -->
<aspect name="kamon.instrumentation.FutureTracing"/>
<!-- Patterns -->
<aspect name="akka.instrumentation.AskPatternTracing"/>
<!-- Spray Server -->
<aspect name="spray.can.server.ServerRequestInstrumentation"/>
<!-- Spray Client -->
<aspect name="spray.can.client.ClientRequestInstrumentation"/>
<!-- TestKit -->
<aspect name="akka.testkit.TestProbeInstrumentation"/>
</aspects>
<weaver options="-verbose -showWeaveInfo">
<include within="scala.concurrent..*"/>
<include within="akka..*"/>
<include within="spray..*"/>
<include within="kamon..*"/>
</weaver>
</aspectj>
2) reference.conf. For *.conf files sbt-assembly uses concat strategy. As a result (part of compiled reference conf with Akka, Spray and Kamon.io):
trace {
ask-pattern-tracing = off
}
}kamon {
spray {
include-trace-token-header = true
trace-token-header-name = "X-Trace-Token"
}
}######################################
# Akka Testkit Reference Config File #
######################################
And error:
Caused by: com.typesafe.config.ConfigException$Parse: reference.conf: 1456: Expecting end of input or a comma, got 'kamon' (if you intended 'kamon' to be part of the value for 'kamon', try enclosing the value in double quotes)
Solution: just add a comment in the beginning or empty line in the end of the every reference.conf file.
Anyway, thanks for cool library ;-)