Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OtlpTraceExporter"/> class.
 /// </summary>
 /// <param name="options">Configuration options for the exporter.</param>
 /// <param name="traceServiceClient"><see cref="OtlpCollector.TraceService.TraceServiceClient"/>.</param>
 internal OtlpTraceExporter(OtlpExporterOptions options, OtlpCollector.TraceService.ITraceServiceClient traceServiceClient = null)
     : base(options)
 {
     if (traceServiceClient != null)
     {
         this.traceClient = traceServiceClient;
     }
     else
     {
         this.Channel     = options.CreateChannel();
         this.traceClient = new OtlpCollector.TraceService.TraceServiceClient(this.Channel);
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="OtlpMetricsExporter"/> class.
 /// </summary>
 /// <param name="options">Configuration options for the exporter.</param>
 /// <param name="metricsServiceClient"><see cref="OtlpCollector.MetricsService.IMetricsServiceClient"/>.</param>
 internal OtlpMetricsExporter(OtlpExporterOptions options, OtlpCollector.MetricsService.IMetricsServiceClient metricsServiceClient = null)
     : base(options)
 {
     if (metricsServiceClient != null)
     {
         this.metricsClient = metricsServiceClient;
     }
     else
     {
         this.Channel       = options.CreateChannel();
         this.metricsClient = new OtlpCollector.MetricsService.MetricsServiceClient(this.Channel);
     }
 }