Skip to content

Commit

Permalink
mark apis internal when !EXPOSE_EXPERIMENTAL_FEATURES
Browse files Browse the repository at this point in the history
  • Loading branch information
Yun-Ting committed Dec 11, 2023
1 parent 7276894 commit 7a7e962
Showing 1 changed file with 61 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,39 +110,80 @@ public static OpenTelemetryLoggerOptions AddOtlpExporter(
/// <summary>
/// Adds an OTLP exporter to the LoggerProvider.
/// </summary>
/// <remarks><b>WARNING</b>: This is an experimental API which might change or be removed in the future. Use at your own risk.</remarks>
/// <param name="builder"><see cref="LoggerProviderBuilder"/> builder to use.</param>
/// <returns>The instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
public static LoggerProviderBuilder AddOtlpExporter(this LoggerProviderBuilder builder)
public
#else
/// <summary>
/// Adds an OTLP exporter to the LoggerProvider.
/// </summary>
/// <param name="builder"><see cref="LoggerProviderBuilder"/> builder to use.</param>
/// <returns>The instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
internal
#endif
static LoggerProviderBuilder AddOtlpExporter(this LoggerProviderBuilder builder)
=> AddOtlpExporter(builder, name: null, configureExporter: null);

#if EXPOSE_EXPERIMENTAL_FEATURES
/// <summary>
/// Adds an OTLP exporter to the LoggerProvider.
/// </summary>
/// <remarks><b>WARNING</b>: This is an experimental API which might change or be removed in the future. Use at your own risk.</remarks>
/// <param name="builder"><see cref="LoggerProviderBuilder"/> builder to use.</param>
/// <param name="configureExporter">Callback action for configuring <see cref="OtlpExporterOptions"/>.</param>
/// <returns>The instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
public static LoggerProviderBuilder AddOtlpExporter(this LoggerProviderBuilder builder, Action<OtlpExporterOptions> configureExporter)
public
#else
/// <summary>
/// Adds an OTLP exporter to the LoggerProvider.
/// </summary>
/// <param name="builder"><see cref="LoggerProviderBuilder"/> builder to use.</param>
/// <param name="configureExporter">Callback action for configuring <see cref="OtlpExporterOptions"/>.</param>
/// <returns>The instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
internal
#endif
static LoggerProviderBuilder AddOtlpExporter(this LoggerProviderBuilder builder, Action<OtlpExporterOptions> configureExporter)
=> AddOtlpExporter(builder, name: null, configureExporter: configureExporter);

#if EXPOSE_EXPERIMENTAL_FEATURES
/// <summary>
/// Adds an OTLP exporter to the LoggerProvider.
/// </summary>
/// <remarks><b>WARNING</b>: This is an experimental API which might change or be removed in the future. Use at your own risk.</remarks>
/// <param name="builder"><see cref="LoggerProviderBuilder"/> builder to use.</param>
/// <param name="configureExporterAndProcessor">Callback action for
/// configuring <see cref="OtlpExporterOptions"/> and <see
/// cref="LogRecordExportProcessorOptions"/>.</param>
/// <returns>The instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
public static LoggerProviderBuilder AddOtlpExporter(this LoggerProviderBuilder builder, Action<OtlpExporterOptions, LogRecordExportProcessorOptions> configureExporterAndProcessor)
public
#else
internal
#endif
static LoggerProviderBuilder AddOtlpExporter(this LoggerProviderBuilder builder, Action<OtlpExporterOptions, LogRecordExportProcessorOptions> configureExporterAndProcessor)
=> AddOtlpExporter(builder, name: null, configureExporterAndProcessor: configureExporterAndProcessor);

#if EXPOSE_EXPERIMENTAL_FEATURES
/// <summary>
/// Adds OpenTelemetry Protocol (OTLP) exporter to the LoggerProvider.
/// </summary>
/// <remarks><b>WARNING</b>: This is an experimental API which might change or be removed in the future. Use at your own risk.</remarks>
/// <param name="builder"><see cref="LoggerProviderBuilder"/> builder to use.</param>
/// <param name="name">Name which is used when retrieving options.</param>
/// <param name="configureExporter">Callback action for configuring <see cref="OtlpExporterOptions"/>.</param>
/// <returns>The instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
public static LoggerProviderBuilder AddOtlpExporter(
public
#else
/// <summary>
/// Adds OpenTelemetry Protocol (OTLP) exporter to the LoggerProvider.
/// </summary>
/// <param name="builder"><see cref="LoggerProviderBuilder"/> builder to use.</param>
/// <param name="name">Name which is used when retrieving options.</param>
/// <param name="configureExporter">Callback action for configuring <see cref="OtlpExporterOptions"/>.</param>
/// <returns>The instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
internal
#endif
static LoggerProviderBuilder AddOtlpExporter(
this LoggerProviderBuilder builder,
string? name,
Action<OtlpExporterOptions>? configureExporter)
Expand Down Expand Up @@ -198,6 +239,19 @@ public static LoggerProviderBuilder AddOtlpExporter(
});
}

#if EXPOSE_EXPERIMENTAL_FEATURES
/// <summary>
/// Adds an OTLP exporter to the LoggerProvider.
/// </summary>
/// <remarks><b>WARNING</b>: This is an experimental API which might change or be removed in the future. Use at your own risk.</remarks>
/// <param name="builder"><see cref="LoggerProviderBuilder"/> builder to use.</param>
/// <param name="name">Name which is used when retrieving options.</param>
/// <param name="configureExporterAndProcessor">Callback action for
/// configuring <see cref="OtlpExporterOptions"/> and <see
/// cref="LogRecordExportProcessorOptions"/>.</param>
/// <returns>The instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
public
#else
/// <summary>
/// Adds an OTLP exporter to the LoggerProvider.
/// </summary>
Expand All @@ -207,7 +261,9 @@ public static LoggerProviderBuilder AddOtlpExporter(
/// configuring <see cref="OtlpExporterOptions"/> and <see
/// cref="LogRecordExportProcessorOptions"/>.</param>
/// <returns>The instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
public static LoggerProviderBuilder AddOtlpExporter(
internal
#endif
static LoggerProviderBuilder AddOtlpExporter(
this LoggerProviderBuilder builder,
string? name,
Action<OtlpExporterOptions, LogRecordExportProcessorOptions> configureExporterAndProcessor)
Expand Down Expand Up @@ -258,7 +314,6 @@ public static LoggerProviderBuilder AddOtlpExporter(
sdkOptionsManager);
});
}
#endif

internal static BaseProcessor<LogRecord> BuildOtlpLogExporter(
IServiceProvider sp,
Expand Down

0 comments on commit 7a7e962

Please sign in to comment.