impl Default for BatchConfigfn BatchConfig::new(max_queue_size? : Int, max_export_batch_size? : Int, scheduled_delay_millis? : Int, export_timeout_millis? : Int) -> BatchConfigpub struct LogExporter {
export_fn : async (ArrayView[LogRecord]) -> Result[Unit, OTelSdkError]
force_flush_fn : async () -> Result[Unit, OTelSdkError]
shutdown_fn : async () -> Result[Unit, OTelSdkError]
name_fn : () -> String
}async fn LogExporter::export_batch(self : LogExporter, batch : ArrayView[LogRecord]) -> Result[Unit, OTelSdkError]fn LogExporter::new(export_fn : async (ArrayView[LogRecord]) -> Result[Unit, OTelSdkError], force_flush_fn? : async () -> Result[Unit, OTelSdkError], shutdown_fn? : async () -> Result[Unit, OTelSdkError], name_fn? : () -> String) -> LogExporterasync fn LogExporter::shutdown_with_timeout(self : LogExporter, timeout_millis : Int) -> Result[Unit, OTelSdkError]pub struct LogProcessor {
emit_fn : async (LogRecord) -> Unit
force_flush_fn : async () -> Result[Unit, OTelSdkError]
shutdown_fn : async () -> Result[Unit, OTelSdkError]
}fn LogProcessor::new(emit_fn? : async (LogRecord) -> Unit, force_flush_fn? : async () -> Result[Unit, OTelSdkError], shutdown_fn? : async () -> Result[Unit, OTelSdkError]) -> LogProcessorasync fn LogProcessor::shutdown_with_timeout(self : LogProcessor, timeout_millis : Int) -> Result[Unit, OTelSdkError]pub struct LogRecord {
event_name : String?
target : String?
body : AnyValue
timestamp_unix_nano : Int64
observed_timestamp_unix_nano : Int64
severity_number : SeverityNumber?
severity_text : String?
attributes : Array[KeyValue]
trace_context : SpanContext?
resource : Resource
instrumentation_scope : InstrumentationScope
} derive(Eq, ToJson, Debug)fn LogRecord::new(body : AnyValue, timestamp_unix_nano? : Int64, observed_timestamp_unix_nano? : Int64, severity_number? : SeverityNumber?, severity_text? : String?, event_name? : String?, target? : String?, attributes? : ArrayView[KeyValue], trace_context? : SpanContext?, resource? : Resource, instrumentation_scope? : InstrumentationScope) -> LogRecordfn SdkLoggerProvider::logger(self : SdkLoggerProvider, name : StringView, version? : String?, schema_url? : String?, attributes? : ArrayView[KeyValue]) -> SdkLoggerasync fn SdkLoggerProvider::shutdown_with_timeout(self : SdkLoggerProvider, timeout_millis : Int) -> Result[Unit, OTelSdkError]fn SdkLoggerProvider::spawn_batch_processor_tasks(self : SdkLoggerProvider, group : TaskGroup[Unit], allow_failure? : Bool) -> Unitpub struct SdkLoggerProviderBuilder {
resource : Resource
processors : Array[LogProcessor]
batch_processors : Array[BatchLogProcessor]
}fn SdkLoggerProviderBuilder::with_batch_exporter(self : SdkLoggerProviderBuilder, exporter : LogExporter, config? : BatchConfig) -> SdkLoggerProviderBuilderfn SdkLoggerProviderBuilder::with_log_processor(self : SdkLoggerProviderBuilder, processor : LogProcessor) -> SdkLoggerProviderBuilderfn SdkLoggerProviderBuilder::with_resource(self : SdkLoggerProviderBuilder, resource : Resource) -> SdkLoggerProviderBuilderfn SdkLoggerProviderBuilder::with_simple_exporter(self : SdkLoggerProviderBuilder, exporter : LogExporter) -> SdkLoggerProviderBuilderInstall
Download zipThe MoonBit implementation of OpenTelemetry.
Dependencies