java.lang.Object
io.helidon.tracing.config.Traceable
io.helidon.tracing.config.SpanTracingConfig
Configuration of a single traced span.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final SpanTracingConfig
A traced span that is disabled and all logs on it are disabled as well.static final SpanTracingConfig
A traced span that is inabled and all logs on it are enabled as well. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SpanTracingConfig.Builder
A fluent API builder to create traced span configuration.static SpanTracingConfig
Create traced span configuration from aConfig
.protected abstract Optional<SpanLogTracingConfig>
getSpanLog
(String name) Configuration of a traced span log.boolean
logEnabled
(String logName, boolean defaultValue) Whether a log event should be logged on the span with a default value.newName()
When rename is desired, returns the new name.final SpanLogTracingConfig
Configuration of a traceable span log.toString()
-
Field Details
-
DISABLED
A traced span that is disabled and all logs on it are disabled as well. -
ENABLED
A traced span that is inabled and all logs on it are enabled as well.
-
-
Constructor Details
-
SpanTracingConfig
A new traceable span.- Parameters:
name
- name of this span
-
-
Method Details
-
toString
-
newName
When rename is desired, returns the new name.- Returns:
- new name for this span or empty when rename is not desired
-
getSpanLog
Configuration of a traced span log.- Parameters:
name
- name of the log event- Returns:
- configuration of the log event, or empty if not explicitly configured (used when merging)
-
spanLog
Configuration of a traceable span log. If this span is disabled, the log is always disabled.- Parameters:
name
- name of the log event- Returns:
- configuration of the log event
-
logEnabled
Whether a log event should be logged on the span with a default value.- Parameters:
logName
- name of the log eventdefaultValue
- to use in case the log event is not configured in this span's configuration- Returns:
- whether to log (
true
) the event or not (false
), uses the default value for unconfigured logs
-
builder
A fluent API builder to create traced span configuration.- Parameters:
name
- name of the span- Returns:
- a new builder instance
-
create
Create traced span configuration from aConfig
.- Parameters:
name
- name of the spanconfig
- config to load span configuration from- Returns:
- a new traced span configuration
-