- java.lang.Object
-
- io.helidon.tracing.config.Traceable
-
- Direct Known Subclasses:
ComponentTracingConfig
,SpanLogTracingConfig
,SpanTracingConfig
,TracingConfig
public abstract class Traceable extends Object
Tracing configuration that can be enabled or disabled.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
enabled()
Whether this traceable should be executed or not.protected abstract Optional<Boolean>
isEnabled()
Whether this trace should be executed or not.String
name()
Name of this traceable unit.
-
-
-
Constructor Detail
-
Traceable
protected Traceable(String name)
A new traceable.- Parameters:
name
- name of this traceable unit
-
-
Method Detail
-
isEnabled
protected abstract Optional<Boolean> isEnabled()
Whether this trace should be executed or not.- Returns:
true
if span/component should be traced,false
if it should not,empty
when this flag is not explicitly configured
-
name
public final String name()
Name of this traceable unit.- Returns:
- name
-
enabled
public final boolean enabled()
Whether this traceable should be executed or not.- Returns:
true
if span/component should be traced,false
if it should not
-
-