Trait

kamon.trace

SpanBuilder

Related Doc: package trace

Permalink

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.

Linear Supertypes
Operation, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SpanBuilder
  2. Operation
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def asChildOf(parent: Span): SpanBuilder

    Permalink

    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.

  2. abstract def context(context: Context): SpanBuilder

    Permalink

    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.

  3. abstract def delay(at: Instant): Delayed

    Permalink

    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.

  4. abstract def delay(): Delayed

    Permalink

    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.

  5. abstract def doNotTrackMetrics(): SpanBuilder

    Permalink

    Disables tracking of the span.processing-time metric for this Span.

  6. abstract def fail(cause: Throwable, errorMessage: String): SpanBuilder

    Permalink

    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.

  7. abstract def fail(cause: Throwable): SpanBuilder

    Permalink

    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.

  8. abstract def fail(errorMessage: String): SpanBuilder

    Permalink

    Marks the operation represented by this Span as failed and adds the provided message as a Span tag using the "error.message" key.

  9. abstract def ignoreParentFromContext(): SpanBuilder

    Permalink

    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.

  10. abstract def kind(kind: Kind): SpanBuilder

    Permalink

    Sets the kind of operation represented by the Span to be created.

  11. abstract def link(span: Span, kind: Kind): SpanBuilder

    Permalink

    Creates a link between this Span and the provided one.

  12. abstract def mark(key: String, at: Instant): SpanBuilder

    Permalink

    Adds a new mark with the provided key and instant.

  13. abstract def mark(key: String): SpanBuilder

    Permalink

    Adds a new mark with the provided key using the current instant from Kamon's clock.

  14. abstract def metricTags(): TagSet

    Permalink

    Returns the Span metric tags that have been added so far to the SpanBuilder.

  15. abstract def name(name: String): SpanBuilder

    Permalink

    Changes the operation name on this SpanBuilder.

  16. abstract def operationName(): String

    Permalink

    Returns the current operation name on this SpanBuilder.

    Returns the current operation name on this SpanBuilder.

    Definition Classes
    SpanBuilderOperation
  17. abstract def samplingDecision(decision: SamplingDecision): SpanBuilder

    Permalink

    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.

  18. abstract def start(): Span

    Permalink

    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.

  19. abstract def start(at: Instant): Span

    Permalink

    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.

  20. abstract def tag(tags: TagSet): SpanBuilder

    Permalink

    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.

  21. abstract def tag(key: String, value: Boolean): SpanBuilder

    Permalink

    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.

  22. abstract def tag(key: String, value: Long): SpanBuilder

    Permalink

    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.

  23. abstract def tag(key: String, value: String): SpanBuilder

    Permalink

    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.

  24. abstract def tagMetrics(tags: TagSet): SpanBuilder

    Permalink

    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.

  25. abstract def tagMetrics(key: String, value: Boolean): SpanBuilder

    Permalink

    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.

  26. abstract def tagMetrics(key: String, value: Long): SpanBuilder

    Permalink

    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.

  27. abstract def tagMetrics(key: String, value: String): SpanBuilder

    Permalink

    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.

  28. abstract def tags(): TagSet

    Permalink

    Returns the Span tags that have been added so far to the SpanBuilder.

  29. abstract def traceId(id: Identifier): SpanBuilder

    Permalink

    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.

  30. abstract def trackMetrics(): SpanBuilder

    Permalink

    Enables tracking of the span.processing-time metric for this Span.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Operation

Inherited from AnyRef

Inherited from Any

Ungrouped