Class LogLimitsBuilder

java.lang.Object
io.opentelemetry.sdk.logs.LogLimitsBuilder

public final class LogLimitsBuilder extends Object
Builder for LogLimits.
Since:
1.27.0
  • Method Details

    • setMaxNumberOfAttributes

      public LogLimitsBuilder setMaxNumberOfAttributes(int maxNumberOfAttributes)
      Sets the max number of attributes per LogRecordData.
      Parameters:
      maxNumberOfAttributes - the max number of attributes per LogRecordData. Must be positive.
      Returns:
      this.
      Throws:
      IllegalArgumentException - if maxNumberOfAttributes is not positive.
    • setMaxAttributeValueLength

      public LogLimitsBuilder setMaxAttributeValueLength(int maxAttributeValueLength)
      Sets the max number of characters for string attribute values. For string array attribute values, applies to each entry individually.
      Parameters:
      maxAttributeValueLength - the max number of characters for attribute strings. Must not be negative.
      Returns:
      this.
      Throws:
      IllegalArgumentException - if maxAttributeValueLength is negative.
    • build

      public LogLimits build()
      Builds and returns a LogLimits with the values of this builder.