Interface AssertingSpanBuilder
- All Superinterfaces:
Span.Builder
A
Span.Builder that can perform assertions on itself.- Since:
- 3.1.0
- Author:
- Marcin Grzejszczak
-
Method Summary
Modifier and TypeMethodDescriptiondefault AssertingSpanBuilderSets an error on the span.default AssertingSpanBuilderSets an event on the span.default AssertingSpanBuilderevent(EventValue value) Sets an event on a span.default AssertingSpanBuilderSets the kind on the span.default AssertingSpanBuilderSets 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 AssertingSpanBuilderSets 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 AssertingSpanBuilderSets a tag on the span.default AssertingSpanBuilderSets a tag on a span.
-
Method Details
-
getDocumentedSpan
DocumentedSpan getDocumentedSpan()- Returns:
- a
DocumentedSpanwith span configuration
-
getDelegate
Span.Builder getDelegate()- Returns:
- wrapped
Span.Builder
-
tag
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
Sets a tag on a span.- Parameters:
key- tag keyvalue- tag- Returns:
- this, for chaining
-
event
Description copied from interface:Span.BuilderSets an event on the span.- Specified by:
eventin interfaceSpan.Builder- Parameters:
value- event value- Returns:
- this
-
event
Sets an event on a span.- Parameters:
value- event- Returns:
- this, for chaining
-
name
Description copied from interface:Span.BuilderSets the name of the span.- Specified by:
namein interfaceSpan.Builder- Parameters:
name- span name- Returns:
- this
-
error
Description copied from interface:Span.BuilderSets an error on the span.- Specified by:
errorin interfaceSpan.Builder- Parameters:
throwable- error to set- Returns:
- this
-
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
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
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
Description copied from interface:Span.BuilderSets no parent of the built span.- Specified by:
setNoParentin interfaceSpan.Builder- Returns:
- this
-
kind
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
Description copied from interface:Span.BuilderBuilds and starts the span.- Specified by:
startin interfaceSpan.Builder- Returns:
- started span
-
of
- Parameters:
documentedSpan- span configurationbuilder- builder to wrap in assertions- Returns:
- asserting span builder
-