public static class DefaultEventProcessorSpanFactory.Builder extends Object
DefaultEventProcessorSpanFactory
. The default values are:
disableBatchTrace
defaults to false
distributedInSameTrace
defaults to false
distributedInSameTraceTimeLimit
defaults to 2 minutesspanFactory
is a required field and should be provided.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DefaultEventProcessorSpanFactory |
build()
Initializes a
DefaultEventProcessorSpanFactory as specified through this Builder. |
DefaultEventProcessorSpanFactory.Builder |
disableBatchTrace(boolean disableBatchTrace)
Sets whether batch tracing should be disabled.
|
DefaultEventProcessorSpanFactory.Builder |
distributedInSameTrace(boolean distributedInSameTrace)
Sets whether events handled by a
StreamingEventProcessor should be traced in the same trace as the
trace that published it. |
DefaultEventProcessorSpanFactory.Builder |
distributedInSameTraceTimeLimit(Duration distributedInSameTraceTimeLimit)
Sets the time limit for events handled by a
StreamingEventProcessor to be traced in the same trace as
the trace that published it. |
DefaultEventProcessorSpanFactory.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 DefaultEventProcessorSpanFactory.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 DefaultEventProcessorSpanFactory.Builder disableBatchTrace(boolean disableBatchTrace)
false
. The result will be a root span for
each event message in a batch. You might lose information about actions done in the commit phase during
processing of the event when set to true.disableBatchTrace
- Whether batch tracing should be disabledpublic DefaultEventProcessorSpanFactory.Builder distributedInSameTrace(boolean distributedInSameTrace)
StreamingEventProcessor
should be traced in the same trace as the
trace that published it. Defaults to false
. If true
, this duration defaults to 2 minutes,
which you can adjust using distributedInSameTraceTimeLimit(Duration)
.distributedInSameTrace
- Whether events handled by a StreamingEventProcessor
should be traced in
the same trace as the trace that published it.public DefaultEventProcessorSpanFactory.Builder distributedInSameTraceTimeLimit(Duration distributedInSameTraceTimeLimit)
StreamingEventProcessor
to be traced in the same trace as
the trace that published it. Defaults to 2 minutes. Only used when
distributedInSameTrace(boolean)
is true
.distributedInSameTraceTimeLimit
- The time limit for events handled by a StreamingEventProcessor
to be traced in the same trace as the trace that published it.protected void validate()
public DefaultEventProcessorSpanFactory build()
DefaultEventProcessorSpanFactory
as specified through this Builder.DefaultEventProcessorSpanFactory
as specified through this Builder.Copyright © 2010–2024. All rights reserved.