From fe8fe1edc582628c06e8e9b71957ff9730ee40ac Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Wed, 6 Dec 2017 12:38:18 +0100 Subject: add helper to get the Span from the current Context --- kamon-core/src/main/scala/kamon/Kamon.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kamon-core') diff --git a/kamon-core/src/main/scala/kamon/Kamon.scala b/kamon-core/src/main/scala/kamon/Kamon.scala index c9a2e415..83a9a3d5 100644 --- a/kamon-core/src/main/scala/kamon/Kamon.scala +++ b/kamon-core/src/main/scala/kamon/Kamon.scala @@ -107,6 +107,9 @@ object Kamon extends MetricLookup with ReporterRegistry with Tracer { def currentContext(): Context = _contextStorage.current() + def currentSpan(): Span = + _contextStorage.current().get(Span.ContextKey) + def storeContext(context: Context): Storage.Scope = _contextStorage.store(context) -- cgit v1.2.3