Interface AssertingSpanBuilder
-
- All Superinterfaces:
Span.Builder
public interface AssertingSpanBuilder extends Span.Builder
ASpan.Builderthat can perform assertions on itself.- Since:
- 3.1.0
- Author:
- Marcin Grzejszczak
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AssertingSpanBuildererror(Throwable throwable)Sets an error on the span.default AssertingSpanBuilderevent(String value)Sets an event on the span.default AssertingSpanBuilderevent(EventValue value)Sets an event on a span.Span.BuildergetDelegate()DocumentedSpangetDocumentedSpan()default AssertingSpanBuilderkind(Span.Kind spanKind)Sets the kind on the span.default AssertingSpanBuildername(String name)Sets the name of the span.static AssertingSpanBuilderof(DocumentedSpan documentedSpan, Span.Builder builder)default Span.BuilderremoteIpAndPort(String ip, int port)Sets the remote URL for the span.default AssertingSpanBuilderremoteServiceName(String remoteServiceName)Sets the remote service name for the span.default AssertingSpanBuildersetNoParent()Sets no parent of the built span.default AssertingSpanBuildersetParent(TraceContext context)Sets the parent of the built span.default AssertingSpanstart()Builds and starts the span.default AssertingSpanBuildertag(String key, String value)Sets a tag on the span.default AssertingSpanBuildertag(TagKey key, String value)Sets a tag on a span.
-
-
-
Method Detail
-
getDocumentedSpan
DocumentedSpan getDocumentedSpan()
- Returns:
- a
DocumentedSpanwith span configuration
-
getDelegate
Span.Builder getDelegate()
- Returns:
- wrapped
Span.Builder
-
tag
default AssertingSpanBuilder tag(String key, String value)
Description copied from interface:Span.BuilderSets a tag on the span.- Specified by:
tagin interfaceSpan.Builder- Parameters:
key- tag keyvalue- tag value- Returns:
- this
-
tag
default AssertingSpanBuilder tag(TagKey key, String value)
Sets a tag on a span.- Parameters:
key- tag keyvalue- tag- Returns:
- this, for chaining
-
event
default AssertingSpanBuilder event(String value)
Description copied from interface:Span.BuilderSets an event on the span.- Specified by:
eventin interfaceSpan.Builder- Parameters:
value- event value- Returns:
- this
-
event
default AssertingSpanBuilder event(EventValue value)
Sets an event on a span.- Parameters:
value- event- Returns:
- this, for chaining
-
name
default AssertingSpanBuilder name(String name)
Description copied from interface:Span.BuilderSets the name of the span.- Specified by:
namein interfaceSpan.Builder- Parameters:
name- span name- Returns:
- this
-
error
default AssertingSpanBuilder error(Throwable throwable)
Description copied from interface:Span.BuilderSets an error on the span.- Specified by:
errorin interfaceSpan.Builder- Parameters:
throwable- error to set- Returns:
- this
-
remoteServiceName
default AssertingSpanBuilder remoteServiceName(String remoteServiceName)
Description copied from interface:Span.BuilderSets the remote service name for the span.- Specified by:
remoteServiceNamein interfaceSpan.Builder- Parameters:
remoteServiceName- remote service name- Returns:
- this
-
remoteIpAndPort
default Span.Builder remoteIpAndPort(String ip, int port)
Description copied from interface:Span.BuilderSets the remote URL for the span.- Specified by:
remoteIpAndPortin interfaceSpan.Builder- Parameters:
ip- remote service ipport- remote service port- Returns:
- this
-
setParent
default AssertingSpanBuilder setParent(TraceContext context)
Description copied from interface:Span.BuilderSets the parent of the built span.- Specified by:
setParentin interfaceSpan.Builder- Parameters:
context- parent's context- Returns:
- this
-
setNoParent
default AssertingSpanBuilder setNoParent()
Description copied from interface:Span.BuilderSets no parent of the built span.- Specified by:
setNoParentin interfaceSpan.Builder- Returns:
- this
-
kind
default AssertingSpanBuilder kind(Span.Kind spanKind)
Description copied from interface:Span.BuilderSets the kind on the span.- Specified by:
kindin interfaceSpan.Builder- Parameters:
spanKind- kind of the span- Returns:
- this
-
start
default AssertingSpan start()
Description copied from interface:Span.BuilderBuilds and starts the span.- Specified by:
startin interfaceSpan.Builder- Returns:
- started span
-
of
static AssertingSpanBuilder of(DocumentedSpan documentedSpan, Span.Builder builder)
- Parameters:
documentedSpan- span configurationbuilder- builder to wrap in assertions- Returns:
- asserting span builder
-
-