Interface AssertingSpanCustomizer
-
- All Superinterfaces:
SpanCustomizer
public interface AssertingSpanCustomizer extends SpanCustomizer
ASpanCustomizer
that 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 AssertingSpanCustomizer
event(String value)
Sets an event on a span.default AssertingSpanCustomizer
event(EventValue value)
Sets an event on a span.SpanCustomizer
getDelegate()
DocumentedSpan
getDocumentedSpan()
default AssertingSpanCustomizer
name(String name)
Sets a name on a span.static AssertingSpanCustomizer
of(DocumentedSpan documentedSpan, SpanCustomizer span)
default AssertingSpanCustomizer
tag(String key, String value)
Sets a tag on a span.default AssertingSpanCustomizer
tag(TagKey key, String value)
Sets a tag on a span.static <T extends SpanCustomizer>
Tunwrap(SpanCustomizer span)
Returns the underlying delegate.
-
-
-
Method Detail
-
getDocumentedSpan
DocumentedSpan getDocumentedSpan()
- Returns:
- a
DocumentedSpan
with span configuration
-
getDelegate
SpanCustomizer getDelegate()
- Returns:
- wrapped
SpanCustomizer
-
tag
default AssertingSpanCustomizer tag(String key, String value)
Description copied from interface:SpanCustomizer
Sets a tag on a span.- Specified by:
tag
in interfaceSpanCustomizer
- Parameters:
key
- tag keyvalue
- tag value- Returns:
- this, for chaining
-
tag
default AssertingSpanCustomizer tag(TagKey key, String value)
Sets a tag on a span.- Parameters:
key
- tag keyvalue
- tag- Returns:
- this, for chaining
-
event
default AssertingSpanCustomizer event(String value)
Description copied from interface:SpanCustomizer
Sets an event on a span.- Specified by:
event
in interfaceSpanCustomizer
- Parameters:
value
- event name- Returns:
- this, for chaining
-
event
default AssertingSpanCustomizer event(EventValue value)
Sets an event on a span.- Parameters:
value
- event- Returns:
- this, for chaining
-
name
default AssertingSpanCustomizer name(String name)
Description copied from interface:SpanCustomizer
Sets a name on a span.- Specified by:
name
in interfaceSpanCustomizer
- Parameters:
name
- name to set on a span- Returns:
- this, for chaining
-
of
static AssertingSpanCustomizer of(DocumentedSpan documentedSpan, SpanCustomizer span)
- Parameters:
documentedSpan
- span configurationspan
- span to wrap in assertions- Returns:
- asserting span customizer
-
unwrap
static <T extends SpanCustomizer> T unwrap(SpanCustomizer span)
Returns the underlying delegate. Used when casting is necessary.- Type Parameters:
T
- type extending a span- Parameters:
span
- span to check for wrapping- Returns:
- unwrapped object
-
-