From 840a313cbddeda78cdeb806fb6bd430c0f860e6b Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Thu, 26 Jan 2023 08:06:21 +0530 Subject: [PATCH] Add support for BatchProcessorOptions in GenevaExporter (#925) * Add support for batchprocessoroptions * Revert logging * nits --- src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md | 4 ++++ .../GenevaExporterHelperExtensions.cs | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md b/src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md index ee894bbca4..64e8ee4d01 100644 --- a/src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md @@ -11,6 +11,10 @@ ([#662](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/662)) ([#874](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/874)) +* Add support for configuring BatchActivityExportProcessor parameters (via + environment variables) used by GenevaTraceExporter in Linux. + ([#925](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/925)) + ## 1.4.0-rc.1 Released 2022-Dec-19 diff --git a/src/OpenTelemetry.Exporter.Geneva/GenevaExporterHelperExtensions.cs b/src/OpenTelemetry.Exporter.Geneva/GenevaExporterHelperExtensions.cs index 09fb5c8942..50de95692b 100644 --- a/src/OpenTelemetry.Exporter.Geneva/GenevaExporterHelperExtensions.cs +++ b/src/OpenTelemetry.Exporter.Geneva/GenevaExporterHelperExtensions.cs @@ -43,7 +43,13 @@ private static TracerProviderBuilder AddGenevaTraceExporter(this TracerProviderB var exporter = new GenevaTraceExporter(options); if (exporter.IsUsingUnixDomainSocket) { - return builder.AddProcessor(new BatchActivityExportProcessor(exporter)); + var batchOptions = new BatchExportActivityProcessorOptions(); + return builder.AddProcessor(new BatchActivityExportProcessor( + exporter, + batchOptions.MaxQueueSize, + batchOptions.ScheduledDelayMilliseconds, + batchOptions.ExporterTimeoutMilliseconds, + batchOptions.MaxExportBatchSize)); } else {