From dc9d2fbeddd29ca46b2072321116ef932dde157a Mon Sep 17 00:00:00 2001
From: Svetlana Brennan <50715937+svetlanabrennan@users.noreply.github.com>
Date: Thu, 18 Nov 2021 17:32:50 -0600
Subject: [PATCH 1/5] Fix metric export interval to match spec
---
src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs | 4 ++--
.../OtlpExporterOptions.cs | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs b/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs
index 3c75ef2d9d1..29560cf65ad 100644
--- a/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs
+++ b/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs
@@ -27,9 +27,9 @@ public class ConsoleExporterOptions
public ConsoleExporterOutputTargets Targets { get; set; } = ConsoleExporterOutputTargets.Console;
///
- /// Gets or sets the metric export interval in milliseconds. The default value is Timeout.Infinite.
+ /// Gets or sets the metric export interval in milliseconds. The default value is 60000.
///
- public int MetricExportIntervalMilliseconds { get; set; } = Timeout.Infinite;
+ public int MetricExportIntervalMilliseconds { get; set; } = 60000;
///
/// Gets or sets the AggregationTemporality used for Histogram
diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
index 5a313952473..6ed3e13a161 100644
--- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
+++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
@@ -109,9 +109,9 @@ public OtlpExporterOptions()
public BatchExportProcessorOptions BatchExportProcessorOptions { get; set; } = new BatchExportActivityProcessorOptions();
///
- /// Gets or sets the metric export interval in milliseconds. The default value is 1000 milliseconds.
+ /// Gets or sets the metric export interval in milliseconds. The default value is 60000.
///
- public int MetricExportIntervalMilliseconds { get; set; } = 1000;
+ public int MetricExportIntervalMilliseconds { get; set; } = 60000;
///
/// Gets or sets the AggregationTemporality used for Histogram
From 74c02cb53106983513476ae58c8a3edd30004275 Mon Sep 17 00:00:00 2001
From: Svetlana Brennan
Date: Thu, 18 Nov 2021 18:22:53 -0600
Subject: [PATCH 2/5] Remove unused using
---
src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs b/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs
index 29560cf65ad..4326baf13a1 100644
--- a/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs
+++ b/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs
@@ -14,7 +14,6 @@
// limitations under the License.
//
-using System.Threading;
using OpenTelemetry.Metrics;
namespace OpenTelemetry.Exporter
From 728347de1eca0e5cd9e9a31b5d7fd8b8814ad7cb Mon Sep 17 00:00:00 2001
From: Svetlana Brennan
Date: Thu, 18 Nov 2021 19:12:59 -0600
Subject: [PATCH 3/5] Revert console exporter options
---
src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs b/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs
index 4326baf13a1..3c75ef2d9d1 100644
--- a/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs
+++ b/src/OpenTelemetry.Exporter.Console/ConsoleExporterOptions.cs
@@ -14,6 +14,7 @@
// limitations under the License.
//
+using System.Threading;
using OpenTelemetry.Metrics;
namespace OpenTelemetry.Exporter
@@ -26,9 +27,9 @@ public class ConsoleExporterOptions
public ConsoleExporterOutputTargets Targets { get; set; } = ConsoleExporterOutputTargets.Console;
///
- /// Gets or sets the metric export interval in milliseconds. The default value is 60000.
+ /// Gets or sets the metric export interval in milliseconds. The default value is Timeout.Infinite.
///
- public int MetricExportIntervalMilliseconds { get; set; } = 60000;
+ public int MetricExportIntervalMilliseconds { get; set; } = Timeout.Infinite;
///
/// Gets or sets the AggregationTemporality used for Histogram
From 9924dd3edf011f4df3a88a0d0969268de922ca81 Mon Sep 17 00:00:00 2001
From: Svetlana Brennan <50715937+svetlanabrennan@users.noreply.github.com>
Date: Thu, 18 Nov 2021 19:19:22 -0600
Subject: [PATCH 4/5] Update CHANGELOG.md
---
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md
index 3c730e087e7..69e2ad0157f 100644
--- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md
+++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md
@@ -5,6 +5,10 @@
* Changed `OtlpExporterOptions` constructor to throw
`FormatException` if it fails to parse any of the supported environment
variables.
+
+* Changed `OtlpExporterOptions.MetricExportIntervalMilliseconds` to default
+ 60000 milliseconds.
+ ([#2641](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2641))
## 1.2.0-beta1
From 508a0fd60bac274c7341d53cae0686b8b8620ebb Mon Sep 17 00:00:00 2001
From: Svetlana Brennan <50715937+svetlanabrennan@users.noreply.github.com>
Date: Thu, 18 Nov 2021 19:25:43 -0600
Subject: [PATCH 5/5] Update CHANGELOG.md
---
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md
index 69e2ad0157f..5315e4ea65a 100644
--- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md
+++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md
@@ -5,7 +5,7 @@
* Changed `OtlpExporterOptions` constructor to throw
`FormatException` if it fails to parse any of the supported environment
variables.
-
+
* Changed `OtlpExporterOptions.MetricExportIntervalMilliseconds` to default
60000 milliseconds.
([#2641](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2641))