[OTLP Exporter] Configurable gRPC ChannelOptions (#1033)
* Allow gRPC ChannelOptions * Adding to the changelog Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
This commit is contained in:
parent
a3bf19d450
commit
ba077fb95a
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
* Allow configurable gRPC channel options
|
||||
([#1033](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1033))
|
||||
|
||||
## 0.3.0-beta
|
||||
|
||||
Released 2020-07-23
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace OpenTelemetry.Exporter.OpenTelemetryProtocol
|
|||
public OtlpExporter(OtlpExporterOptions options)
|
||||
{
|
||||
this.headers = options.Headers;
|
||||
this.channel = new Channel(options.Endpoint, options.Credentials);
|
||||
this.channel = new Channel(options.Endpoint, options.Credentials, options.ChannelOptions);
|
||||
this.traceClient = new OtlpCollector.TraceService.TraceServiceClient(this.channel);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
// limitations under the License.
|
||||
// </copyright>
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Grpc.Core;
|
||||
|
||||
namespace OpenTelemetry.Exporter.OpenTelemetryProtocol
|
||||
|
|
@ -38,6 +39,11 @@ namespace OpenTelemetry.Exporter.OpenTelemetryProtocol
|
|||
/// <summary>
|
||||
/// Gets or sets optional headers for the connection.
|
||||
/// </summary>
|
||||
public Metadata Headers { get; set; } = new Metadata();
|
||||
public Metadata Headers { get; set; } = new Metadata();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the gRPC channel options.
|
||||
/// </summary>
|
||||
public IEnumerable<ChannelOption> ChannelOptions { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue