Package codes.grow.packages.betterstack
Record Class BetterStackLogExporterOptions
java.lang.Object
java.lang.Record
codes.grow.packages.betterstack.BetterStackLogExporterOptions
- Record Components:
encoding- body encoding; empty usesBetterStackConfig.encoding()maxRequestBytes- uncompressed bytes per request, 1 to 10 MiB (default 10 MiB)maxRecordBytes- encoded bytes per record, 1 to 10 MiB (default 10 MiB); larger records are rejected before anything is sent
public record BetterStackLogExporterOptions(Optional<IngestEncoding> encoding, int maxRequestBytes, int maxRecordBytes)
extends Record
Options of a
BetterStackLogExporter: body encoding and request limits.-
Constructor Summary
ConstructorsConstructorDescriptionBetterStackLogExporterOptions(Optional<IngestEncoding> encoding, int maxRequestBytes, int maxRecordBytes) Fills defaults. -
Method Summary
Modifier and TypeMethodDescriptiondefaults()Defaults: the configured encoding, 10 MiB limits.encoding()Returns the value of theencodingrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxRecordBytesrecord component.intReturns the value of themaxRequestBytesrecord component.of(IngestEncoding encoding) Options with an explicit encoding and default limits.final StringtoString()Returns a string representation of this record class.withMaxRecordBytes(int bytes) Copy with another record limit.withMaxRequestBytes(int bytes) Copy with another request limit.
-
Constructor Details
-
BetterStackLogExporterOptions
public BetterStackLogExporterOptions(Optional<IngestEncoding> encoding, int maxRequestBytes, int maxRecordBytes) Fills defaults.- Parameters:
encoding- body encoding or emptymaxRequestBytes- request limit, 0 for the defaultmaxRecordBytes- record limit, 0 for the default
-
-
Method Details
-
defaults
Defaults: the configured encoding, 10 MiB limits.- Returns:
- options
-
of
Options with an explicit encoding and default limits.- Parameters:
encoding- body encoding- Returns:
- options
-
withMaxRequestBytes
Copy with another request limit.- Parameters:
bytes- uncompressed bytes per request- Returns:
- options
-
withMaxRecordBytes
Copy with another record limit.- Parameters:
bytes- encoded bytes per record- Returns:
- options
-
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 '=='. -
encoding
Returns the value of theencodingrecord component.- Returns:
- the value of the
encodingrecord component
-
maxRequestBytes
public int maxRequestBytes()Returns the value of themaxRequestBytesrecord component.- Returns:
- the value of the
maxRequestBytesrecord component
-
maxRecordBytes
public int maxRecordBytes()Returns the value of themaxRecordBytesrecord component.- Returns:
- the value of the
maxRecordBytesrecord component
-