From c501cb3ada77217f07abea2d9bab5306f9e1b899 Mon Sep 17 00:00:00 2001 From: Mikel Blanchard Date: Fri, 5 May 2023 08:46:51 -0700 Subject: [PATCH] [sdk-logs] Add Sdk.CreateLoggerProviderBuilder (#4464) --- src/OpenTelemetry/Sdk.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/OpenTelemetry/Sdk.cs b/src/OpenTelemetry/Sdk.cs index f903510b40c..0258018b6e1 100644 --- a/src/OpenTelemetry/Sdk.cs +++ b/src/OpenTelemetry/Sdk.cs @@ -19,6 +19,7 @@ using System.Diagnostics; using OpenTelemetry.Context.Propagation; using OpenTelemetry.Internal; +using OpenTelemetry.Logs; using OpenTelemetry.Metrics; using OpenTelemetry.Trace; @@ -83,5 +84,19 @@ public static TracerProviderBuilder CreateTracerProviderBuilder() { return new TracerProviderBuilderBase(); } + + /// + /// Creates a which is used to build + /// a . In a typical application, a single + /// is created at application startup and + /// disposed at application shutdown. It is important to ensure that the + /// provider is not disposed too early. + /// + /// instance, which is used + /// to build a . + internal static LoggerProviderBuilder CreateLoggerProviderBuilder() + { + return new LoggerProviderServiceCollectionBuilder(); + } } }