Package com.oracle.bmc.apmtraces.model
Class Span.Builder
- java.lang.Object
-
- com.oracle.bmc.apmtraces.model.Span.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Span
build()
Span.Builder
copy(Span model)
Span.Builder
durationInMs(Long durationInMs)
Total span duration in milliseconds.Span.Builder
isError(Boolean isError)
Indicates if the span has an error.Span.Builder
key(String key)
Unique identifier (spanId) for the span.Span.Builder
kind(String kind)
Kind associated with the span.Span.Builder
logs(List<SpanLogCollection> logs)
List of logs associated with the span.Span.Builder
operationName(String operationName)
Span name associated with the trace.Span.Builder
parentSpanKey(String parentSpanKey)
Unique parent identifier for the span if one exists.Span.Builder
serviceName(String serviceName)
Service name associated with the span.Span.Builder
sourceName(Span.SourceName sourceName)
Source of span (spans, syn_spans).Span.Builder
tags(List<Tag> tags)
List of tags associated with the span.Span.Builder
tagsMetadata(Map<String,TagMetadata> tagsMetadata)
Metadata about the tags in the span.Span.Builder
timeEnded(Date timeEnded)
Span end time.Span.Builder
timeStarted(Date timeStarted)
Span start time.Span.Builder
traceKey(String traceKey)
Unique identifier for the trace.
-
-
-
Method Detail
-
key
public Span.Builder key(String key)
Unique identifier (spanId) for the span.Note that this field is defined as spanKey in the API and it maps to the spanId in the trace data in Application Performance Monitoring.
- Parameters:
key
- the value to set- Returns:
- this builder
-
parentSpanKey
public Span.Builder parentSpanKey(String parentSpanKey)
Unique parent identifier for the span if one exists.For root spans this will be null.
- Parameters:
parentSpanKey
- the value to set- Returns:
- this builder
-
traceKey
public Span.Builder traceKey(String traceKey)
Unique identifier for the trace.- Parameters:
traceKey
- the value to set- Returns:
- this builder
-
timeStarted
public Span.Builder timeStarted(Date timeStarted)
Span start time.Timestamp when the span was started.
- Parameters:
timeStarted
- the value to set- Returns:
- this builder
-
timeEnded
public Span.Builder timeEnded(Date timeEnded)
Span end time.Timestamp when the span was completed.
- Parameters:
timeEnded
- the value to set- Returns:
- this builder
-
durationInMs
public Span.Builder durationInMs(Long durationInMs)
Total span duration in milliseconds.- Parameters:
durationInMs
- the value to set- Returns:
- this builder
-
operationName
public Span.Builder operationName(String operationName)
Span name associated with the trace.This is usually the method or URI of the request.
- Parameters:
operationName
- the value to set- Returns:
- this builder
-
serviceName
public Span.Builder serviceName(String serviceName)
Service name associated with the span.- Parameters:
serviceName
- the value to set- Returns:
- this builder
-
kind
public Span.Builder kind(String kind)
Kind associated with the span.- Parameters:
kind
- the value to set- Returns:
- this builder
-
tags
public Span.Builder tags(List<Tag> tags)
List of tags associated with the span.- Parameters:
tags
- the value to set- Returns:
- this builder
-
tagsMetadata
public Span.Builder tagsMetadata(Map<String,TagMetadata> tagsMetadata)
Metadata about the tags in the span.- Parameters:
tagsMetadata
- the value to set- Returns:
- this builder
-
logs
public Span.Builder logs(List<SpanLogCollection> logs)
List of logs associated with the span.- Parameters:
logs
- the value to set- Returns:
- this builder
-
isError
public Span.Builder isError(Boolean isError)
Indicates if the span has an error.- Parameters:
isError
- the value to set- Returns:
- this builder
-
sourceName
public Span.Builder sourceName(Span.SourceName sourceName)
Source of span (spans, syn_spans).- Parameters:
sourceName
- the value to set- Returns:
- this builder
-
build
public Span build()
-
copy
public Span.Builder copy(Span model)
-
-