-
- All Implemented Interfaces:
-
io.opentelemetry.api.trace.Span,io.opentelemetry.context.ImplicitContextKeyed
public class OtelSpan implements Span
-
-
Field Summary
Fields Modifier and Type Field Description private StatusCodestatusCode
-
Constructor Summary
Constructors Constructor Description OtelSpan(AgentSpan delegate, AgentTracer.TracerAPI agentTracer)
-
Method Summary
Modifier and Type Method Description StatusCodegetStatusCode()static Spaninvalid()<T> SpansetAttribute(AttributeKey<T> key, T value)SpanaddEvent(String name, Attributes attributes)SpanaddEvent(String name, Attributes attributes, long timestamp, TimeUnit unit)SpansetStatus(StatusCode statusCode, String description)SpanrecordException(Throwable exception, Attributes additionalAttributes)SpanupdateName(String name)voidend()voidend(long timestamp, TimeUnit unit)SpanContextgetSpanContext()booleanisRecording()AgentScopeactivate()AgentSpan.ContextgetAgentSpanContext()-
Methods inherited from class io.opentelemetry.api.trace.Span
addEvent, current, end, fromContext, fromContextOrNull, getInvalid, getSpanContext, isRecording, recordException, setAllAttributes, setAttribute, setStatus, storeInContext, updateName, wrap -
Methods inherited from class io.opentelemetry.context.ImplicitContextKeyed
makeCurrent -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getStatusCode
StatusCode getStatusCode()
-
invalid
static Span invalid()
-
setAttribute
<T> Span setAttribute(AttributeKey<T> key, T value)
-
recordException
Span recordException(Throwable exception, Attributes additionalAttributes)
-
updateName
Span updateName(String name)
-
end
void end()
-
getSpanContext
SpanContext getSpanContext()
-
isRecording
boolean isRecording()
-
activate
AgentScope activate()
-
getAgentSpanContext
AgentSpan.Context getAgentSpanContext()
-
-
-
-