Class Span.Builder
java.lang.Object
codes.grow.packages.tempo.tracing.query.Span.Builder
- Enclosing class:
Span
-
Method Summary
Modifier and TypeMethodDescriptionAdds one attribute.attributes(Map<String, ?> attributes) Adds attributes.build()Builds the span.durationMicros(long durationMicros) Sets an explicit duration.event(Span.Event event) Adds an event.Sets the kind.Adds a link.parentSpanId(String parentSpanId) Sets the parent span id.serviceName(String serviceName) Sets the service name.status(Span.StatusCode code, String message) Sets the status.times(long startMicros, long endMicros) Sets start and end.
-
Method Details
-
parentSpanId
Sets the parent span id.- Parameters:
parentSpanId- parent ornull- Returns:
- this builder
-
kind
Sets the kind.- Parameters:
kind- kind- Returns:
- this builder
-
serviceName
Sets the service name.- Parameters:
serviceName- service name- Returns:
- this builder
-
times
Sets start and end.- Parameters:
startMicros- startendMicros- end- Returns:
- this builder
-
durationMicros
Sets an explicit duration.- Parameters:
durationMicros- duration- Returns:
- this builder
-
status
Sets the status.- Parameters:
code- codemessage- description ornull- Returns:
- this builder
-
attributes
Adds attributes.- Parameters:
attributes- attribute values- Returns:
- this builder
-
attribute
Adds one attribute.- Parameters:
key- namevalue- value- Returns:
- this builder
-
event
Adds an event.- Parameters:
event- event- Returns:
- this builder
-
link
Adds a link.- Parameters:
link- link- Returns:
- this builder
-
build
Builds the span.- Returns:
- span
-