java.lang.Object
io.helidon.tracing.config.Traceable
io.helidon.tracing.config.TracingConfig
Tracing configuration that contains traced components (such as WebServer, Security) and their traced spans and span logs.
Spans can be renamed through configuration, components, spans and span logs may be disabled through this configuration.
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TracingConfig
Traced conifg that is disabled for all components, spans and logs.static final TracingConfig
Traced config that is enabled for all components, spans and logs. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TracingConfig.Builder
builder()
A fluent API builder for tracing configuration.Configuration of a traced component.Configuration of a traced component.static TracingConfig
Create new tracing configuration based on the provided config.protected abstract Optional
<ComponentTracingConfig> getComponent
(String componentName) Configuration of a traced component.static TracingConfig
merge
(TracingConfig older, TracingConfig newer) Merge two configurations together.spanConfig
(String component, String spanName) Return configuration of a specific span.toString()
-
Field Details
-
ENABLED
Traced config that is enabled for all components, spans and logs. -
DISABLED
Traced conifg that is disabled for all components, spans and logs.
-
-
Constructor Details
-
TracingConfig
A new traced configuration.- Parameters:
name
- name of this configuration, when created usingTracingConfig.Builder
, the name ishelidon
-
-
Method Details
-
getComponent
Configuration of a traced component.- Parameters:
componentName
- name of the component- Returns:
- component tracing configuration or empty if defaults should be used
-
component
Configuration of a traced component.- Parameters:
componentName
- name of the component- Returns:
- component tracing configuration if configured, or an enabled component configuration
-
component
Configuration of a traced component.- Parameters:
componentName
- name of the componentenabledByDefault
- whether the component should be enabled or disabled in case it is not configured- Returns:
- component tracing configuration if configured, or an enabled/disabled component configuration depending on
enabledByDefault
-
toString
-
create
Create new tracing configuration based on the provided config.- Parameters:
config
- configuration of tracing- Returns:
- tracing configuration
-
builder
A fluent API builder for tracing configuration.- Returns:
- a new builder instance
-
merge
Merge two configurations together. The result will combine configuration from both configurations. In case of conflicts, thenewer
wins.- Parameters:
older
- older instance to mergenewer
- newer (more significant) instance to merge- Returns:
- a new configuration combining odler and newer
-
spanConfig
Return configuration of a specific span. This is a shortcut method tocomponent(String)
andComponentTracingConfig.span(String)
.- Parameters:
component
- component, such as "web-server", "security"spanName
- name of the span, such as "HTTP Request", "security:atn"- Returns:
- configuration of the span if present in this traced system configuration
-