Record Class DistributedTracingSettings

java.lang.Object
java.lang.Record
io.axoniq.framework.messaging.distributed.tracing.DistributedTracingSettings
Record Components:
commandBusConnectorEnabled - whether the CommandBusConnector is decorated with tracing
queryBusConnectorEnabled - whether the QueryBusConnector is decorated with tracing

public record DistributedTracingSettings(boolean commandBusConnectorEnabled, boolean queryBusConnectorEnabled) extends Record
Settings controlling tracing for distributed messaging connectors.

Register these settings as a configuration component to enable or disable tracing for individual connector types. When no settings are registered, tracing is enabled for every distributed connector.

Since:
5.3.0
Author:
Mateusz Nowak
  • Constructor Details

    • DistributedTracingSettings

      public DistributedTracingSettings(boolean commandBusConnectorEnabled, boolean queryBusConnectorEnabled)
      Creates an instance of a DistributedTracingSettings record class.
      Parameters:
      commandBusConnectorEnabled - the value for the commandBusConnectorEnabled record component
      queryBusConnectorEnabled - the value for the queryBusConnectorEnabled record component
  • Method Details

    • enabledByDefault

      public static DistributedTracingSettings enabledByDefault()
      Returns the default settings, with every distributed connector enabled for tracing.
      Returns:
      the all-enabled default settings
    • withCommandBusConnectorEnabled

      public DistributedTracingSettings withCommandBusConnectorEnabled(boolean enabled)
      Returns settings with command bus connector tracing set to enabled.
      Parameters:
      enabled - whether command bus connector tracing is enabled
      Returns:
      settings with the updated command bus connector tracing value
    • withQueryBusConnectorEnabled

      public DistributedTracingSettings withQueryBusConnectorEnabled(boolean enabled)
      Returns settings with query bus connector tracing set to enabled.
      Parameters:
      enabled - whether query bus connector tracing is enabled
      Returns:
      settings with the updated query bus connector tracing value
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • commandBusConnectorEnabled

      public boolean commandBusConnectorEnabled()
      Returns the value of the commandBusConnectorEnabled record component.
      Returns:
      the value of the commandBusConnectorEnabled record component
    • queryBusConnectorEnabled

      public boolean queryBusConnectorEnabled()
      Returns the value of the queryBusConnectorEnabled record component.
      Returns:
      the value of the queryBusConnectorEnabled record component