From 0d08c78bbb18cf9eb658815804d51540cc478ccf Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 21 Feb 2024 11:18:19 -0800 Subject: [PATCH] add comment follow up --- .../Implementation/ExportClient/BaseOtlpHttpExportClient.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/BaseOtlpHttpExportClient.cs b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/BaseOtlpHttpExportClient.cs index 56f0118aa87..8f98447e3b3 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/BaseOtlpHttpExportClient.cs +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/BaseOtlpHttpExportClient.cs @@ -38,6 +38,9 @@ protected BaseOtlpHttpExportClient(OtlpExporterOptions options, HttpClient httpC /// public ExportClientResponse SendExportRequest(TRequest request, CancellationToken cancellationToken = default) { + // Using this.HttpClient.Timeout.TotalMilliseconds here as the client can be configured by the user + // in this case the timeout set within the client will take precedence over timeout set via otlpexporter options + // the value will also match the timeout set via options when the client is NOT provided by the user. DateTime deadline = DateTime.UtcNow.AddMilliseconds(this.HttpClient.Timeout.TotalMilliseconds); try {