diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2014-10-24 23:58:57 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-10-24 23:58:57 +0200 |
commit | 3e2c2b3ba39ad8cca4874e3be3004f8a182dab36 (patch) | |
tree | ebff9c94ac7441322a1b30e6c492e7e3f8b0f0ce /kamon-core/src/main/scala/kamon/trace | |
parent | 81ae33c18c7d875240db1b2bbf8fcb2d6e41ca47 (diff) | |
download | Kamon-3e2c2b3ba39ad8cca4874e3be3004f8a182dab36.tar.gz Kamon-3e2c2b3ba39ad8cca4874e3be3004f8a182dab36.tar.bz2 Kamon-3e2c2b3ba39ad8cca4874e3be3004f8a182dab36.zip |
+ akka-remote: create a new kamon-akka-remote module, closes #99
Diffstat (limited to 'kamon-core/src/main/scala/kamon/trace')
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala b/kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala index bc7a0db2..778edc42 100644 --- a/kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala +++ b/kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala @@ -16,8 +16,6 @@ package kamon.trace -import akka.remote.instrumentation.TraceContextAwareWireFormats.RemoteTraceContext - import scala.language.experimental.macros import java.util.concurrent.atomic.AtomicLong import kamon.macros.InlineTraceContextMacro @@ -45,24 +43,15 @@ object TraceRecorder { new SimpleMetricCollectionContext(name, finalToken, metadata, TraceContextOrigin.Local, system) } - def joinRemoteTraceContext(remoteTraceContext: RemoteTraceContext, system: ActorSystem): TraceContext = { + def joinRemoteTraceContext(traceName: String, traceToken: String, startMilliTime: Long, isOpen: Boolean, system: ActorSystem): TraceContext = { new SimpleMetricCollectionContext( - remoteTraceContext.getTraceName(), - remoteTraceContext.getTraceToken(), + traceName, + traceToken, Map.empty, TraceContextOrigin.Remote, system, - remoteTraceContext.getStartMilliTime(), - remoteTraceContext.getIsOpen()) - } - - def forkTraceContext(context: TraceContext, newName: String): TraceContext = { - new SimpleMetricCollectionContext( - newName, - context.token, - Map.empty, - TraceContextOrigin.Local, - context.system) + startMilliTime, + isOpen) } def setContext(context: Option[TraceContext]): Unit = traceContextStorage.set(context) |