trait SpanBuilder extends Operation
Gathers information about an operation before it can be turned into a Span. The Span creation is handled in two steps (creating a builder and then creating a Span from it) because there are certain bits of information that can only be influenced or changed at the early life of a Span, like the parent Span or the Trace information but once the SpanBuilder is turned into a Span they cannot be modified anymore.
Implementations are not expected to be thread safe.
- Alphabetic
- By Inheritance
- SpanBuilder
- Operation
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def asChildOf(parent: Span): SpanBuilder
Sets the parent of the Span to be created.
Sets the parent of the Span to be created. By making a Span child of another it will inherit the Trace information from its parent.
- abstract def context(context: Context): SpanBuilder
Sets the context to be used when looking up tags and a possible parent Span if no parent is explicitly provided.
Sets the context to be used when looking up tags and a possible parent Span if no parent is explicitly provided. If no specific Context is provided the builder implementation falls back to the current Kamon Context.
- abstract def delay(at: Instant): Delayed
Creates a new Delayed Span with all the information accumulated on the builder and the provided instant as its creation time.
Creates a new Delayed Span with all the information accumulated on the builder and the provided instant as its creation time. When a Span is created, its id, parentId, location and trace information become fixed and can no longer be modified.
- abstract def delay(): Delayed
Creates a new Delayed Span with all the information accumulated on the builder and the current instant as its creation time.
Creates a new Delayed Span with all the information accumulated on the builder and the current instant as its creation time. When a Span is created, its id, parentId, location and trace information become fixed and can no longer be modified.
- abstract def doNotTrackMetrics(): SpanBuilder
Disables tracking of the span.processing-time metric for this Span.
- abstract def fail(cause: Throwable, errorMessage: String): SpanBuilder
Marks the operation represented by this Span as failed and adds the provided message as a Span tag using the "error.message" key and optionally adds the "error.stacktrace" Span tag with the stack trace from the provided throwable.
Marks the operation represented by this Span as failed and adds the provided message as a Span tag using the "error.message" key and optionally adds the "error.stacktrace" Span tag with the stack trace from the provided throwable. See the "kamon.trace.include-error-stacktrace" setting for more information.
- abstract def fail(cause: Throwable): SpanBuilder
Marks the operation represented by this Span as failed and optionally adds the "error.stacktrace" Span tag with the stack trace from the provided throwable.
Marks the operation represented by this Span as failed and optionally adds the "error.stacktrace" Span tag with the stack trace from the provided throwable. See the "kamon.trace.include-error-stacktrace" setting for more information.
- abstract def fail(errorMessage: String): SpanBuilder
Marks the operation represented by this Span as failed and adds the provided message as a Span tag using the "error.message" key.
- abstract def ignoreParentFromContext(): SpanBuilder
Signals that the builder should not attempt to make the new Span a child of the Span held on the current context at the moment of creation, if any.
- abstract def kind(kind: Kind): SpanBuilder
Sets the kind of operation represented by the Span to be created.
- abstract def link(span: Span, kind: Kind): SpanBuilder
Creates a link between this Span and the provided one.
- abstract def mark(key: String, at: Instant): SpanBuilder
Adds a new mark with the provided key and instant.
- abstract def mark(key: String): SpanBuilder
Adds a new mark with the provided key using the current instant from Kamon's clock.
- abstract def metricTags(): TagSet
Returns the Span metric tags that have been added so far to the SpanBuilder.
- abstract def name(name: String): SpanBuilder
Changes the operation name on this SpanBuilder.
- abstract def operationName(): String
Returns the current operation name on this SpanBuilder.
Returns the current operation name on this SpanBuilder.
- Definition Classes
- SpanBuilder → Operation
- abstract def samplingDecision(decision: SamplingDecision): SpanBuilder
Suggests a sampling decision in case a new Trace will be created for the new Span.
Suggests a sampling decision in case a new Trace will be created for the new Span. This suggestion will only be taken into account if this Span doesn't have any parent or the parent's sampling decision is Unknown.
- abstract def start(): Span
Creates a new Span with all then information accumulated on the builder and the current instant as its start time stamp.
Creates a new Span with all then information accumulated on the builder and the current instant as its start time stamp. When a Span is created, its id, parentId, location and trace information become fixed and can no longer be modified.
- abstract def start(at: Instant): Span
Creates a new Span with all the information accumulated on the builder and the provided instant as its start time stamp.
Creates a new Span with all the information accumulated on the builder and the provided instant as its start time stamp. When a Span is created, its id, parentId, location and trace information become fixed and can no longer be modified.
- abstract def tag(tags: TagSet): SpanBuilder
Adds all key/value pairs in the provided tags to the Span tags.
Adds all key/value pairs in the provided tags to the Span tags. If a tag with the provided key was already present then its value will be overwritten.
- abstract def tag(key: String, value: Boolean): SpanBuilder
Adds the provided key/value pair to the Span tags.
Adds the provided key/value pair to the Span tags. If a tag with the provided key was already present then its value will be overwritten.
- abstract def tag(key: String, value: Long): SpanBuilder
Adds the provided key/value pair to the Span tags.
Adds the provided key/value pair to the Span tags. If a tag with the provided key was already present then its value will be overwritten.
- abstract def tag(key: String, value: String): SpanBuilder
Adds the provided key/value pair to the Span tags.
Adds the provided key/value pair to the Span tags. If a tag with the provided key was already present then its value will be overwritten.
- abstract def tagMetrics(tags: TagSet): SpanBuilder
Adds all key/value pairs in the provided tags to the Span metric tags.
Adds all key/value pairs in the provided tags to the Span metric tags. If a tag with the provided key was already present then its value will be overwritten.
- abstract def tagMetrics(key: String, value: Boolean): SpanBuilder
Adds the provided key/value pair to the Span metric tags.
Adds the provided key/value pair to the Span metric tags. If a tag with the provided key was already present then its value will be overwritten.
- abstract def tagMetrics(key: String, value: Long): SpanBuilder
Adds the provided key/value pair to the Span metric tags.
Adds the provided key/value pair to the Span metric tags. If a tag with the provided key was already present then its value will be overwritten.
- abstract def tagMetrics(key: String, value: String): SpanBuilder
Adds the provided key/value pair to the Span metric tags.
Adds the provided key/value pair to the Span metric tags. If a tag with the provided key was already present then its value will be overwritten.
- abstract def tags(): TagSet
Returns the Span tags that have been added so far to the SpanBuilder.
- abstract def traceId(id: Identifier): SpanBuilder
Suggests a Trace Identifier in case a new Trace will be created for the new Span.
Suggests a Trace Identifier in case a new Trace will be created for the new Span. This suggestion will only be taken into account if the new Span is to become the root Span in a new Trace, otherwise the parent Span's trace will be used.
- abstract def trackMetrics(): SpanBuilder
Enables tracking of the span.processing-time metric for this Span.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()