Serilog.OpenTelemetryLoggerConfigurationExtensions
Adds OpenTelemetry sink configuration methods to LoggerSinkConfiguration.
public static LoggerConfiguration OpenTelemetry(this LoggerSinkConfiguration loggerSinkConfiguration, Action<BatchedOpenTelemetrySinkOptions> configure, bool ignoreEnvironment = false)
Send log events to an OTLP exporter.
public static LoggerConfiguration OpenTelemetry(this LoggerSinkConfiguration loggerSinkConfiguration, Action<BatchedOpenTelemetrySinkOptions> configure, Func<string, string> getConfigurationVariable)
Send log events to an OTLP exporter.
public static LoggerConfiguration OpenTelemetry(this LoggerSinkConfiguration loggerSinkConfiguration, string endpoint = "http://localhost:4317", OtlpProtocol protocol = 0, IDictionary<string, string> headers = null, IDictionary<string, object> resourceAttributes = null, IncludedData? includedData = default, LogEventLevel restrictedToMinimumLevel = 0, LoggingLevelSwitch levelSwitch = null)
Send log events to an OTLP exporter.
public static LoggerConfiguration OpenTelemetry(this LoggerAuditSinkConfiguration loggerAuditSinkConfiguration, Action<OpenTelemetrySinkOptions> configure)
Audit to an OTLP exporter, waiting for each event to be acknowledged, and propagating errors to the caller.
public static LoggerConfiguration OpenTelemetry(this LoggerAuditSinkConfiguration loggerAuditSinkConfiguration, string endpoint = "http://localhost:4317", OtlpProtocol protocol = 0, IDictionary<string, string> headers = null, IDictionary<string, object> resourceAttributes = null, IncludedData? includedData = default)
Audit to an OTLP exporter, waiting for each event to be acknowledged, and propagating errors to the caller.