Skip to content

Commit 81d29cf

Browse files
authored
[otlp] Rename ProgrammaticallyModifiedEndpoint -> AppendSignalPathToEndpoint (#5427)
1 parent eb2f998 commit 81d29cf

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/BaseOtlpHttpExportClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected BaseOtlpHttpExportClient(OtlpExporterOptions options, HttpClient httpC
2121
Guard.ThrowIfNull(signalPath);
2222
Guard.ThrowIfInvalidTimeout(options.TimeoutMilliseconds);
2323

24-
Uri exporterEndpoint = !options.ProgrammaticallyModifiedEndpoint
24+
Uri exporterEndpoint = options.AppendSignalPathToEndpoint
2525
? options.Endpoint.AppendPathIfNotPresent(signalPath)
2626
: options.Endpoint;
2727
this.Endpoint = new UriBuilder(exporterEndpoint).Uri;

src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs

+8-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public Uri Endpoint
114114
set
115115
{
116116
this.endpoint = value;
117-
this.ProgrammaticallyModifiedEndpoint = true;
117+
this.AppendSignalPathToEndpoint = false;
118118
}
119119
}
120120

@@ -180,9 +180,14 @@ public Uri Endpoint
180180
public Func<HttpClient> HttpClientFactory { get; set; }
181181

182182
/// <summary>
183-
/// Gets a value indicating whether <see cref="Endpoint" /> was modified via its setter.
183+
/// Gets a value indicating whether or not the signal-specific path should
184+
/// be appended to <see cref="Endpoint"/>.
184185
/// </summary>
185-
internal bool ProgrammaticallyModifiedEndpoint { get; private set; }
186+
/// <remarks>
187+
/// Note: Only applicable when <see cref="OtlpExportProtocol.HttpProtobuf"/>
188+
/// is used.
189+
/// </remarks>
190+
internal bool AppendSignalPathToEndpoint { get; private set; } = true;
186191

187192
internal static void RegisterOtlpExporterOptionsFactory(IServiceCollection services)
188193
{

0 commit comments

Comments
 (0)