Class SpanOptions.Builder
java.lang.Object
codes.grow.packages.skywalking.tracing.SpanOptions.Builder
- Enclosing class:
SpanOptions
Builder for
SpanOptions.-
Method Summary
Modifier and TypeMethodDescriptionAdds one attribute.attributes(Map<String, ?> attributes) Adds attributes.build()Builds the options.kind(io.opentelemetry.api.trace.SpanKind kind) Sets the span kind.link(io.opentelemetry.api.trace.SpanContext link) Adds a link.parent(io.opentelemetry.context.Context parent) Sets the parent context (default: the current context).tracer(io.opentelemetry.api.trace.Tracer tracer) Sets the tracer.
-
Method Details
-
attributes
Adds attributes.- Parameters:
attributes- attribute values- Returns:
- this builder
-
attribute
Adds one attribute.- Parameters:
key- namevalue- value- Returns:
- this builder
-
kind
Sets the span kind.- Parameters:
kind- kind- Returns:
- this builder
-
link
Adds a link.- Parameters:
link- linked span context- Returns:
- this builder
-
tracer
Sets the tracer.- Parameters:
tracer- tracer- Returns:
- this builder
-
parent
Sets the parent context (default: the current context).- Parameters:
parent- parent- Returns:
- this builder
-
build
Builds the options.- Returns:
- options
-