diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2014-02-05 01:12:34 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-02-05 01:12:34 -0300 |
commit | 522a12c90788c402a364407e146d302e6519a3da (patch) | |
tree | 3603c2172a8048b5f13c923d85e14b4f8490ca53 /kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala | |
parent | 57e433c07a271b4e5e4159500cdc828cd7bb6a83 (diff) | |
download | Kamon-522a12c90788c402a364407e146d302e6519a3da.tar.gz Kamon-522a12c90788c402a364407e146d302e6519a3da.tar.bz2 Kamon-522a12c90788c402a364407e146d302e6519a3da.zip |
kamon-newrelic now uses the subscription protocol to report metrics to NewRelic
Diffstat (limited to 'kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala b/kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala index 3e3bb19f..0e264cd2 100644 --- a/kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala +++ b/kamon-core/src/main/scala/kamon/trace/TraceRecorder.scala @@ -54,6 +54,8 @@ object TraceRecorder { def startSegment(identity: SegmentIdentity, metadata: Map[String, String]): Option[SegmentCompletionHandle] = currentContext.map(_.startSegment(identity, metadata)) + def rename(name: String): Unit = currentContext.map(_.rename(name)) + def withNewTraceContext[T](name: String, token: Option[String] = None, metadata: Map[String, String] = Map.empty)(thunk: ⇒ T)(implicit system: ActorSystem): T = withTraceContext(Some(newTraceContext(name, token, metadata, system)))(thunk) |