diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-12-06 12:38:18 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-12-06 12:38:18 +0100 |
commit | fe8fe1edc582628c06e8e9b71957ff9730ee40ac (patch) | |
tree | 91e8bee3600fb708edb2a3bcc0ff4a417678266c /kamon-core | |
parent | 94b5e7640bfda860d2b0d6818a38b7ec395a530d (diff) | |
download | Kamon-fe8fe1edc582628c06e8e9b71957ff9730ee40ac.tar.gz Kamon-fe8fe1edc582628c06e8e9b71957ff9730ee40ac.tar.bz2 Kamon-fe8fe1edc582628c06e8e9b71957ff9730ee40ac.zip |
add helper to get the Span from the current Context
Diffstat (limited to 'kamon-core')
-rw-r--r-- | kamon-core/src/main/scala/kamon/Kamon.scala | 3 |
1 files changed, 3 insertions, 0 deletions
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) |