diff options
Diffstat (limited to 'kamon-core/src/main/scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/Tracer.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kamon-core/src/main/scala/kamon/trace/Tracer.scala b/kamon-core/src/main/scala/kamon/trace/Tracer.scala index 714f0215..71201871 100644 --- a/kamon-core/src/main/scala/kamon/trace/Tracer.scala +++ b/kamon-core/src/main/scala/kamon/trace/Tracer.scala @@ -157,6 +157,11 @@ object Tracer { this } + def asChildOf(parentContext: Option[SpanContext]): SpanBuilder = { + parentContext.foreach(asChildOf) + this + } + def asChildOf(parentSpan: Span): SpanBuilder = asChildOf(parentSpan.context()) |