Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[otlp] Update README for UseOtlpExporter & new experimental flag #5452

Merged
merged 17 commits into from
Mar 21, 2024
Merged
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
OpenTelemetry.OpenTelemetryBuilderOtlpExporterExtensions
static OpenTelemetry.OpenTelemetryBuilderOtlpExporterExtensions.UseOtlpExporter(this OpenTelemetry.IOpenTelemetryBuilder! builder) -> OpenTelemetry.IOpenTelemetryBuilder!
static OpenTelemetry.OpenTelemetryBuilderOtlpExporterExtensions.UseOtlpExporter(this OpenTelemetry.IOpenTelemetryBuilder! builder, OpenTelemetry.Exporter.OtlpExportProtocol protocol, System.Uri! baseEndpoint) -> OpenTelemetry.IOpenTelemetryBuilder!
static OpenTelemetry.OpenTelemetryBuilderOtlpExporterExtensions.UseOtlpExporter(this OpenTelemetry.IOpenTelemetryBuilder! builder, OpenTelemetry.Exporter.OtlpExportProtocol protocol, System.Uri! baseUrl) -> OpenTelemetry.IOpenTelemetryBuilder!
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static class OpenTelemetryBuilderOtlpExporterExtensions
/// tracing.</item>
/// <item>The exporter registered by this method will be added as the last
/// processor in the pipeline established for logging and tracing.</item>
/// <item>This method can only be called once. Subsequent calls will results
/// <item>This method can only be called once. Subsequent calls will result
/// in a <see cref="NotSupportedException"/> being thrown.</item>
/// <item>This method cannot be called in addition to signal-specific
/// <c>AddOtlpExporter</c> methods. If this method is called signal-specific
Expand All @@ -45,25 +45,25 @@ public static IOpenTelemetryBuilder UseOtlpExporter(
/// <returns><inheritdoc cref="UseOtlpExporter(IOpenTelemetryBuilder)" path="/returns"/></returns>
/// <param name="builder"><see cref="IOpenTelemetryBuilder"/>.</param>
/// <param name="protocol"><see cref="OtlpExportProtocol"/>.</param>
/// <param name="baseEndpoint">
/// <para>Base endpoint to use.</para>
/// Note: A signal-specific path will be appended to the base endpoint for
/// each signal automatically if the protocol is set to <see
/// <param name="baseUrl">
/// <para>Base URL to use.</para>
/// Note: A signal-specific path will be appended to the base URL for each
/// signal automatically if the protocol is set to <see
/// cref="OtlpExportProtocol.HttpProtobuf"/>.
/// </param>
public static IOpenTelemetryBuilder UseOtlpExporter(
this IOpenTelemetryBuilder builder,
OtlpExportProtocol protocol,
Uri baseEndpoint)
Uri baseUrl)
{
Guard.ThrowIfNull(baseEndpoint);
Guard.ThrowIfNull(baseUrl);

return UseOtlpExporter(builder, name: null, configuration: null, configure: otlpBuilder =>
{
otlpBuilder.ConfigureDefaultExporterOptions(o =>
{
o.Protocol = protocol;
o.Endpoint = baseEndpoint;
o.Endpoint = baseUrl;
});
});
}
Expand Down
Loading