Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename metrics exporter option MetricExportInterval to MetricExportIntervalMilliSeconds #2193

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/Console/TestMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ internal static object Run(MetricsOptions options)
providerBuilder
.AddOtlpExporter(o =>
{
o.MetricExportInterval = options.DefaultCollectionPeriodMilliseconds;
o.MetricExportIntervalMilliSeconds = options.DefaultCollectionPeriodMilliseconds;
o.IsDelta = options.IsDelta;
});
}
Expand All @@ -75,7 +75,7 @@ internal static object Run(MetricsOptions options)
providerBuilder
.AddConsoleExporter(o =>
{
o.MetricExportInterval = options.DefaultCollectionPeriodMilliseconds;
o.MetricExportIntervalMilliSeconds = options.DefaultCollectionPeriodMilliseconds;
o.IsDelta = options.IsDelta;
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static MeterProviderBuilder AddConsoleExporter(this MeterProviderBuilder

var options = new ConsoleExporterOptions();
configure?.Invoke(options);
return builder.AddMetricProcessor(new PushMetricProcessor(new ConsoleMetricExporter(options), options.MetricExportInterval, options.IsDelta));
return builder.AddMetricProcessor(new PushMetricProcessor(new ConsoleMetricExporter(options), options.MetricExportIntervalMilliSeconds, options.IsDelta));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public class ConsoleExporterOptions
public ConsoleExporterOutputTargets Targets { get; set; } = ConsoleExporterOutputTargets.Console;

/// <summary>
/// Gets or sets the metric export interval.
/// Gets or sets the metric export interval in milliseconds. The default value is 1000 milliseconds.
/// </summary>
public int MetricExportInterval { get; set; } = 1000;
public int MetricExportIntervalMilliSeconds { get; set; } = 1000;

/// <summary>
/// Gets or sets a value indicating whether to export Delta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static MeterProviderBuilder AddInMemoryExporter(this MeterProviderBuilder

var options = new InMemoryExporterOptions();
configure?.Invoke(options);
return builder.AddMetricProcessor(new PushMetricProcessor(new InMemoryExporter<MetricItem>(exportedItems), options.MetricExportInterval, options.IsDelta));
return builder.AddMetricProcessor(new PushMetricProcessor(new InMemoryExporter<MetricItem>(exportedItems), options.MetricExportIntervalMilliSeconds, options.IsDelta));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ namespace OpenTelemetry.Exporter
public class InMemoryExporterOptions
{
/// <summary>
/// Gets or sets the metric export interval.
/// Gets or sets the metric export interval in milliseconds. The default value is 1000 milliseconds.
/// </summary>
public int MetricExportInterval { get; set; } = 1000;
public int MetricExportIntervalMilliSeconds { get; set; } = 1000;

/// <summary>
/// Gets or sets a value indicating whether to export Delta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public class OtlpExporterOptions
public BatchExportProcessorOptions<Activity> BatchExportProcessorOptions { get; set; } = new BatchExportProcessorOptions<Activity>();

/// <summary>
/// Gets or sets the metric export interval.
/// Gets or sets the metric export interval in milliseconds. The default value is 1000 milliseconds.
/// </summary>
public int MetricExportInterval { get; set; } = 1000;
public int MetricExportIntervalMilliSeconds { get; set; } = 1000;

/// <summary>
/// Gets or sets a value indicating whether to export Delta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static MeterProviderBuilder AddOtlpExporter(this MeterProviderBuilder bui

var options = new OtlpExporterOptions();
configure?.Invoke(options);
return builder.AddMetricProcessor(new PushMetricProcessor(new OtlpMetricsExporter(options), options.MetricExportInterval, options.IsDelta));
return builder.AddMetricProcessor(new PushMetricProcessor(new OtlpMetricsExporter(options), options.MetricExportIntervalMilliSeconds, options.IsDelta));
}
}
}