public static class DefaultSnapshotterSpanFactory.Builder extends Object
DefaultSnapshotterSpanFactory
.
The default values are:
separateTrace
defaults to true
aggregateTypeInSpanName
defaults to true
spanFactory
is a required field and should be provided.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DefaultSnapshotterSpanFactory.Builder |
aggregateTypeInSpanName(boolean aggregateTypeInSpanName)
Whether the aggregate type should be included in the span name.
|
DefaultSnapshotterSpanFactory |
build()
Initializes a
DefaultSnapshotterSpanFactory as specified through this Builder. |
DefaultSnapshotterSpanFactory.Builder |
separateTrace(boolean separateTrace)
Sets whether the creation of the snapshot should be represented by a separate trace.
|
DefaultSnapshotterSpanFactory.Builder |
spanFactory(SpanFactory spanFactory)
Sets the
SpanFactory to use to create the spans. |
protected void |
validate()
Validates whether the fields contained in this Builder are set accordingly.
|
public DefaultSnapshotterSpanFactory.Builder spanFactory(SpanFactory spanFactory)
SpanFactory
to use to create the spans. This is a required field.spanFactory
- The SpanFactory
to use to create the spans.public DefaultSnapshotterSpanFactory.Builder separateTrace(boolean separateTrace)
false
.
By default, the creation of the snapshot is part of the same trace as the scheduling of the snapshot. This
happens by default in the framework as well, as snapshots are created after command invocation in the
current thread. If you configure the Snapshotter
to create snapshots in a separate thread, you might want to
set this to true
. The new root trace will be linked to the parent trace so it can be correlated.
separateTrace
- Whether the creation of the snapshot should be represented by a separate trace.public DefaultSnapshotterSpanFactory.Builder aggregateTypeInSpanName(boolean aggregateTypeInSpanName)
true
.aggregateTypeInSpanName
- Whether the aggregate type should be included in the span name.protected void validate()
public DefaultSnapshotterSpanFactory build()
DefaultSnapshotterSpanFactory
as specified through this Builder.DefaultSnapshotterSpanFactory
as specified through this Builder.Copyright © 2010–2024. All rights reserved.