Expand description
§OpenTelemetry Log SDK
Structs§
- Batch
Config - Batch log processor configuration.
Use
BatchConfigBuilderto configure your own instance ofBatchConfig. - Batch
Config Builder - A builder for creating
BatchConfiginstances. - Batch
LogProcessor - The
BatchLogProcessorcollects finished logs in a buffer and exports them in batches to the configuredLogExporter. This processor is ideal for high-throughput environments, as it minimizes the overhead of exporting logs individually. It uses a dedicated background thread to manage and export logs asynchronously, ensuring that the application’s main execution flow is not blocked. - Batch
LogProcessor Builder - A builder for creating
BatchLogProcessorinstances. - LogBatch
- A batch of log records to be exported by a
LogExporter. - Logger
Provider Builder - Builder for provider attributes.
- SdkLog
Record - LogRecord represents all data carried by a log record, and
is provided to
LogExporters as input. - SdkLogger
- The object for emitting
LogRecords. - SdkLogger
Provider - Handles the creation and coordination of
Loggers. - Simple
LogProcessor - A
LogProcessordesigned for testing and debugging purpose, that immediately exports log records as they are emitted. Log records are exported synchronously in the same thread that emits the log record. When using this processor with the OTLP Exporter, the following exporter features are supported: - Trace
Context - TraceContext stores the trace context for logs that have an associated span.
Constants§
- OTEL_
BLRP_ EXPORT_ TIMEOUT - Environment variable for configuring the maximum allowed time to export data.
- OTEL_
BLRP_ EXPORT_ TIMEOUT_ DEFAULT - Default maximum allowed time to export data.
- OTEL_
BLRP_ MAX_ EXPORT_ BATCH_ SIZE - Environment variable for configuring the maximum batch size for the
BatchLogProcessor, must be less than or equal toOTEL_BLRP_MAX_QUEUE_SIZE. - OTEL_
BLRP_ MAX_ EXPORT_ BATCH_ SIZE_ DEFAULT - Default maximum batch size.
- OTEL_
BLRP_ MAX_ QUEUE_ SIZE - Environment variable for configuring the maximum queue size for the
BatchLogProcessor. - OTEL_
BLRP_ MAX_ QUEUE_ SIZE_ DEFAULT - Default maximum queue size.
- OTEL_
BLRP_ SCHEDULE_ DELAY - Environment variable for configuring the delay interval (in milliseconds)
between two consecutive exports for the
BatchLogProcessor. - OTEL_
BLRP_ SCHEDULE_ DELAY_ DEFAULT - Default delay interval between two consecutive exports.
Traits§
- LogExporter
LogExporterdefines the interface that log exporters should implement.- LogProcessor
- The interface for plugging into a
SdkLogger.