Record Class ModellingTracingSettings
java.lang.Object
java.lang.Record
org.axonframework.modelling.tracing.configuration.ModellingTracingSettings
- Record Components:
repositoryEnabled- whether theRepositoryis decorated with tracingstateManagerEnabled- whether theStateManageris decorated with tracingspanAttributesProviders- toggles for the built-in span attribute providers contributed by this module
public record ModellingTracingSettings(boolean repositoryEnabled, boolean stateManagerEnabled, ModellingTracingSettings.SpanAttributesProviders spanAttributesProviders)
extends Record
Per-component on/off toggles for modelling tracing, read by
ModellingTracingConfigurationEnhancer to decide
which axon-modelling components to decorate.
When no instance is registered, every component defaults to enabled (enabledByDefault()). To adjust the
toggles declaratively, register an instance as a component -- typically starting from the defaults and using the
with* copy methods:
configurer.componentRegistry(cr -> cr.registerComponent(
ModellingTracingSettings.class,
c -> ModellingTracingSettings.enabledByDefault().withStateManagerEnabled(false)));
Higher-level integrations (for example property-based configuration layers) register a translated instance on the
application's behalf; an explicitly registered component always takes precedence.- Since:
- 5.3.0
- Author:
- Mateusz Nowak
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordToggles for the built-inSpanAttributesProviderscontributed by theaxon-modellingmodule (read byModellingSpanAttributesProviderConfigurationEnhancer). -
Constructor Summary
ConstructorsConstructorDescriptionModellingTracingSettings(boolean repositoryEnabled, boolean stateManagerEnabled, ModellingTracingSettings.SpanAttributesProviders spanAttributesProviders) Creates an instance of aModellingTracingSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ModellingTracingSettingsReturns the default settings, with every modelling component enabled for tracing and every built-in span attribute provider enabled.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of therepositoryEnabledrecord component.Returns the value of thespanAttributesProvidersrecord component.booleanReturns the value of thestateManagerEnabledrecord component.final StringtoString()Returns a string representation of this record class.withRepositoryEnabled(boolean repositoryEnabled) Returns a copy of these settings withrepositoryEnabled()replaced by the given value.withSpanAttributesProviders(ModellingTracingSettings.SpanAttributesProviders spanAttributesProviders) Returns a copy of these settings withspanAttributesProviders()replaced by the given value.withStateManagerEnabled(boolean stateManagerEnabled) Returns a copy of these settings withstateManagerEnabled()replaced by the given value.
-
Constructor Details
-
ModellingTracingSettings
public ModellingTracingSettings(boolean repositoryEnabled, boolean stateManagerEnabled, ModellingTracingSettings.SpanAttributesProviders spanAttributesProviders) Creates an instance of aModellingTracingSettingsrecord class.- Parameters:
repositoryEnabled- the value for therepositoryEnabledrecord componentstateManagerEnabled- the value for thestateManagerEnabledrecord componentspanAttributesProviders- the value for thespanAttributesProvidersrecord component
-
-
Method Details
-
enabledByDefault
Returns the default settings, with every modelling component enabled for tracing and every built-in span attribute provider enabled.- Returns:
- the all-enabled default settings
-
withRepositoryEnabled
Returns a copy of these settings withrepositoryEnabled()replaced by the given value.- Parameters:
repositoryEnabled- whether theRepositoryis decorated with tracing- Returns:
- a copy of these settings with the given
repositoryEnabled
-
withStateManagerEnabled
Returns a copy of these settings withstateManagerEnabled()replaced by the given value.- Parameters:
stateManagerEnabled- whether theStateManageris decorated with tracing- Returns:
- a copy of these settings with the given
stateManagerEnabled
-
withSpanAttributesProviders
public ModellingTracingSettings withSpanAttributesProviders(ModellingTracingSettings.SpanAttributesProviders spanAttributesProviders) Returns a copy of these settings withspanAttributesProviders()replaced by the given value.- Parameters:
spanAttributesProviders- toggles for the built-in span attribute providers contributed by this module- Returns:
- a copy of these settings with the given
spanAttributesProviders
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
repositoryEnabled
public boolean repositoryEnabled()Returns the value of therepositoryEnabledrecord component.- Returns:
- the value of the
repositoryEnabledrecord component
-
stateManagerEnabled
public boolean stateManagerEnabled()Returns the value of thestateManagerEnabledrecord component.- Returns:
- the value of the
stateManagerEnabledrecord component
-
spanAttributesProviders
Returns the value of thespanAttributesProvidersrecord component.- Returns:
- the value of the
spanAttributesProvidersrecord component
-