Package org.opensearch.telemetry.tracing
Class SpanCreationContext
java.lang.Object
org.opensearch.telemetry.tracing.SpanCreationContext
Context for span details.
- Opensearch.experimental:
-
Method Summary
Modifier and TypeMethodDescriptionattributes(Attributes attributes) Sets the span attributes.static SpanCreationContextclient()Sets the span type to client.Returns the span attributes.Returns the parent spanReturns the span kind.Returns the span name.static SpanCreationContextinternal()Sets the span type to internal.Sets the span name.parent(SpanContext parent) Sets the parent for spanstatic SpanCreationContextserver()Sets the span type to server.
-
Method Details
-
server
Sets the span type to server.- Returns:
- spanCreationContext
-
client
Sets the span type to client.- Returns:
- spanCreationContext
-
internal
Sets the span type to internal.- Returns:
- spanCreationContext
-
name
Sets the span name.- Parameters:
spanName- span name.- Returns:
- spanCreationContext
-
attributes
Sets the span attributes.- Parameters:
attributes- attributes.- Returns:
- spanCreationContext
-
parent
Sets the parent for span- Parameters:
parent- parent span context- Returns:
- spanCreationContext
-
getSpanName
Returns the span name.- Returns:
- span name
-
getAttributes
Returns the span attributes.- Returns:
- attributes.
-
getSpanKind
Returns the span kind.- Returns:
- spankind.
-
getParent
Returns the parent span- Returns:
- parent.
-