Class SpanDataAssert
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<SpanDataAssert,io.opentelemetry.sdk.trace.data.SpanData>
-
- io.opentelemetry.sdk.testing.assertj.SpanDataAssert
-
- All Implemented Interfaces:
org.assertj.core.api.Assert<SpanDataAssert,io.opentelemetry.sdk.trace.data.SpanData>,org.assertj.core.api.Descriptable<SpanDataAssert>,org.assertj.core.api.ExtensionPoints<SpanDataAssert,io.opentelemetry.sdk.trace.data.SpanData>
public final class SpanDataAssert extends org.assertj.core.api.AbstractAssert<SpanDataAssert,io.opentelemetry.sdk.trace.data.SpanData>
Assertions for an exportedSpanData.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpanDataAssertendsAt(long endEpochNanos)Asserts the span ends at the given epoch timestamp, in nanos.SpanDataAssertendsAt(long startEpoch, TimeUnit unit)Asserts the span ends at the given epoch timestamp.SpanDataAssertendsAt(Instant timestamp)Asserts the span ends at the given epoch timestamp.SpanDataAsserthasAttributes(io.opentelemetry.api.common.Attributes attributes)Asserts the span has the given attributes.SpanDataAsserthasAttributesSatisfying(Consumer<io.opentelemetry.api.common.Attributes> attributes)Asserts the span has attributes satisfying the given condition.SpanDataAsserthasEnded()Asserts the span has ended.SpanDataAsserthasEvents(io.opentelemetry.sdk.trace.data.EventData... events)Asserts the span has the given events.SpanDataAsserthasEvents(Iterable<io.opentelemetry.sdk.trace.data.EventData> events)Asserts the span has the given events.SpanDataAsserthasEventsSatisfying(Consumer<List<? extends io.opentelemetry.sdk.trace.data.EventData>> condition)Asserts the span has events satisfying the given condition.SpanDataAsserthasInstrumentationLibraryInfo(io.opentelemetry.sdk.common.InstrumentationLibraryInfo instrumentationLibraryInfo)Asserts the span has the givenInstrumentationLibraryInfo.SpanDataAsserthasKind(io.opentelemetry.api.trace.SpanKind kind)Asserts the span has the given kind.SpanDataAsserthasLinks(io.opentelemetry.sdk.trace.data.LinkData... links)Asserts the span has the given links.SpanDataAsserthasLinks(Iterable<io.opentelemetry.sdk.trace.data.LinkData> links)Asserts the span has the given links.SpanDataAsserthasLinksSatisfying(Consumer<List<? extends io.opentelemetry.sdk.trace.data.LinkData>> condition)Asserts the span has events satisfying the given condition.SpanDataAsserthasName(String name)Asserts the span has the given name.SpanDataAsserthasNotEnded()Asserts the span has not ended.SpanDataAsserthasParentSpanId(String parentSpanId)Asserts the span has the given parent span ID.SpanDataAsserthasResource(io.opentelemetry.sdk.resources.Resource resource)Asserts the span has the givenResource.SpanDataAsserthasSpanId(String spanId)Asserts the span has the given span ID.SpanDataAsserthasStatus(io.opentelemetry.sdk.trace.data.StatusData status)Asserts the span has the givenStatusData.SpanDataAsserthasTotalAttributeCount(int totalAttributeCount)Asserts the span has the given total attributes.SpanDataAsserthasTotalRecordedEvents(int totalRecordedEvents)Asserts the span has the given total recorded events.SpanDataAsserthasTotalRecordedLinks(int totalRecordedLinks)Asserts the span has the given total recorded links.SpanDataAsserthasTraceId(String traceId)Asserts the span has the given trace ID.SpanDataAsserthasTraceState(io.opentelemetry.api.trace.TraceState traceState)Asserts the span has the givenTraceState.SpanDataAssertisNotSampled()Asserts the span is not sampled.SpanDataAssertisSampled()Asserts the span is sampled.SpanDataAssertstartsAt(long startEpochNanos)Asserts the span starts at the given epoch timestamp, in nanos.SpanDataAssertstartsAt(long startEpoch, TimeUnit unit)Asserts the span starts at the given epoch timestamp.SpanDataAssertstartsAt(Instant timestamp)Asserts the span starts at the given epoch timestamp.-
Methods inherited from class org.assertj.core.api.AbstractAssert
asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
-
-
-
-
Method Detail
-
hasTraceId
public SpanDataAssert hasTraceId(String traceId)
Asserts the span has the given trace ID.
-
hasSpanId
public SpanDataAssert hasSpanId(String spanId)
Asserts the span has the given span ID.
-
isSampled
public SpanDataAssert isSampled()
Asserts the span is sampled.
-
isNotSampled
public SpanDataAssert isNotSampled()
Asserts the span is not sampled.
-
hasTraceState
public SpanDataAssert hasTraceState(io.opentelemetry.api.trace.TraceState traceState)
Asserts the span has the givenTraceState.
-
hasParentSpanId
public SpanDataAssert hasParentSpanId(String parentSpanId)
Asserts the span has the given parent span ID.
-
hasResource
public SpanDataAssert hasResource(io.opentelemetry.sdk.resources.Resource resource)
Asserts the span has the givenResource.
-
hasInstrumentationLibraryInfo
public SpanDataAssert hasInstrumentationLibraryInfo(io.opentelemetry.sdk.common.InstrumentationLibraryInfo instrumentationLibraryInfo)
Asserts the span has the givenInstrumentationLibraryInfo.
-
hasName
public SpanDataAssert hasName(String name)
Asserts the span has the given name.
-
hasKind
public SpanDataAssert hasKind(io.opentelemetry.api.trace.SpanKind kind)
Asserts the span has the given kind.
-
startsAt
public SpanDataAssert startsAt(long startEpochNanos)
Asserts the span starts at the given epoch timestamp, in nanos.
-
startsAt
public SpanDataAssert startsAt(long startEpoch, TimeUnit unit)
Asserts the span starts at the given epoch timestamp.
-
startsAt
public SpanDataAssert startsAt(Instant timestamp)
Asserts the span starts at the given epoch timestamp.
-
hasAttributes
public SpanDataAssert hasAttributes(io.opentelemetry.api.common.Attributes attributes)
Asserts the span has the given attributes.
-
hasAttributesSatisfying
public SpanDataAssert hasAttributesSatisfying(Consumer<io.opentelemetry.api.common.Attributes> attributes)
Asserts the span has attributes satisfying the given condition.
-
hasEvents
public SpanDataAssert hasEvents(Iterable<io.opentelemetry.sdk.trace.data.EventData> events)
Asserts the span has the given events.
-
hasEvents
public SpanDataAssert hasEvents(io.opentelemetry.sdk.trace.data.EventData... events)
Asserts the span has the given events.
-
hasEventsSatisfying
public SpanDataAssert hasEventsSatisfying(Consumer<List<? extends io.opentelemetry.sdk.trace.data.EventData>> condition)
Asserts the span has events satisfying the given condition.
-
hasLinks
public SpanDataAssert hasLinks(Iterable<io.opentelemetry.sdk.trace.data.LinkData> links)
Asserts the span has the given links.
-
hasLinks
public SpanDataAssert hasLinks(io.opentelemetry.sdk.trace.data.LinkData... links)
Asserts the span has the given links.
-
hasLinksSatisfying
public SpanDataAssert hasLinksSatisfying(Consumer<List<? extends io.opentelemetry.sdk.trace.data.LinkData>> condition)
Asserts the span has events satisfying the given condition.
-
hasStatus
public SpanDataAssert hasStatus(io.opentelemetry.sdk.trace.data.StatusData status)
Asserts the span has the givenStatusData.
-
endsAt
public SpanDataAssert endsAt(long endEpochNanos)
Asserts the span ends at the given epoch timestamp, in nanos.
-
endsAt
public SpanDataAssert endsAt(long startEpoch, TimeUnit unit)
Asserts the span ends at the given epoch timestamp.
-
endsAt
public SpanDataAssert endsAt(Instant timestamp)
Asserts the span ends at the given epoch timestamp.
-
hasEnded
public SpanDataAssert hasEnded()
Asserts the span has ended.
-
hasNotEnded
public SpanDataAssert hasNotEnded()
Asserts the span has not ended.
-
hasTotalRecordedEvents
public SpanDataAssert hasTotalRecordedEvents(int totalRecordedEvents)
Asserts the span has the given total recorded events.
-
hasTotalRecordedLinks
public SpanDataAssert hasTotalRecordedLinks(int totalRecordedLinks)
Asserts the span has the given total recorded links.
-
hasTotalAttributeCount
public SpanDataAssert hasTotalAttributeCount(int totalAttributeCount)
Asserts the span has the given total attributes.
-
-