pub struct LogClientOptions {
pub batch: BatchOptions,
pub resource: Attributes,
pub redaction: Option<RedactionProcessor>,
pub min_severity: Severity,
pub protocol: LogProtocol,
pub exporter: Option<IngestExporterOptions>,
pub otlp: Option<OtlpExporterOptions>,
}Expand description
Options of BetterStackClient::log_client.
Fields§
§batch: BatchOptionsBatch options; max_batch_bytes is capped at the 10 MiB request limit.
resource: AttributesResource attributes added to every record (service.name, …).
redaction: Option<RedactionProcessor>Redaction applied to every record (default RedactionProcessor::default); None
disables it.
min_severity: SeverityMinimum severity of loggers made by LogClient::logger (default Info).
protocol: LogProtocolHTTP ingest (default) or OTLP.
exporter: Option<IngestExporterOptions>Encoding and limits of the HTTP exporter (protocol Http); default: the client’s
shared exporter.
otlp: Option<OtlpExporterOptions>Options of the OTLP exporter (protocol Otlp); default: the client’s shared exporter.
Implementations§
Source§impl LogClientOptions
impl LogClientOptions
Sourcepub fn batch(self, batch: BatchOptions) -> Self
pub fn batch(self, batch: BatchOptions) -> Self
Sets the batch options.
Sourcepub fn resource_attribute(
self,
key: impl Into<String>,
value: impl Into<AttrValue>,
) -> Self
pub fn resource_attribute( self, key: impl Into<String>, value: impl Into<AttrValue>, ) -> Self
Adds one resource attribute.
Sourcepub fn protocol(self, protocol: LogProtocol) -> Self
pub fn protocol(self, protocol: LogProtocol) -> Self
Sets the protocol.
Sourcepub fn exporter(self, opts: IngestExporterOptions) -> Self
pub fn exporter(self, opts: IngestExporterOptions) -> Self
Sets the HTTP exporter options.
Sourcepub fn otlp(self, opts: OtlpExporterOptions) -> Self
pub fn otlp(self, opts: OtlpExporterOptions) -> Self
Sets the OTLP exporter options (and selects OTLP).
Trait Implementations§
Source§impl Clone for LogClientOptions
impl Clone for LogClientOptions
Source§impl Debug for LogClientOptions
impl Debug for LogClientOptions
Auto Trait Implementations§
impl !RefUnwindSafe for LogClientOptions
impl !UnwindSafe for LogClientOptions
impl Forget for LogClientOptions
impl Freeze for LogClientOptions
impl Move for LogClientOptions
impl Send for LogClientOptions
impl Sync for LogClientOptions
impl Unpin for LogClientOptions
impl UnsafeUnpin for LogClientOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more