Class LogLimits

java.lang.Object
io.opentelemetry.sdk.logs.LogLimits
Direct Known Subclasses:
AutoValue_LogLimits

@Immutable public abstract class LogLimits extends Object
Class that holds limits enforced during log recording.

Note: To allow dynamic updates of LogLimits you should register a Supplier with SdkLoggerProviderBuilder.setLogLimits(Supplier) which supplies dynamic configs when queried.

Since:
1.27.0
  • Field Details

    • DEFAULT

      private static final LogLimits DEFAULT
  • Constructor Details

    • LogLimits

      LogLimits()
  • Method Details

    • getDefault

      public static LogLimits getDefault()
      Returns the default LogLimits.
    • builder

      public static LogLimitsBuilder builder()
      Returns a new LogLimitsBuilder to construct a LogLimits.
    • create

      static LogLimits create(int maxNumAttributes, int maxAttributeLength)
    • getMaxNumberOfAttributes

      public abstract int getMaxNumberOfAttributes()
      Returns the max number of attributes per LogRecordData.
      Returns:
      the max number of attributes per LogRecordData.
    • getMaxAttributeValueLength

      public abstract int getMaxAttributeValueLength()
      Returns the max number of characters for string attribute values. For string array attribute values, applies to each entry individually.
      Returns:
      the max number of characters for attribute strings.
    • toBuilder

      public LogLimitsBuilder toBuilder()
      Returns a LogLimitsBuilder initialized to the same property values as the current instance.
      Returns:
      a LogLimitsBuilder initialized to the same property values as the current instance.