Skip to content

Commit 02b4838

Browse files
committed
chore: Adjust parameters ordering to avoid unnamed parameters breaking change
1 parent eb3c0b6 commit 02b4838

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter<System.Diagnostics.Activity!>! exporter, bool useThreads = true, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void
2-
OpenTelemetry.BatchExportProcessor<T>.BatchExportProcessor(OpenTelemetry.BaseExporter<T!>! exporter, bool useThreads = true, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void
3-
OpenTelemetry.BatchLogRecordExportProcessor.BatchLogRecordExportProcessor(OpenTelemetry.BaseExporter<OpenTelemetry.Logs.LogRecord!>! exporter, bool useThreads = true, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void
4-
OpenTelemetry.Metrics.PeriodicExportingMetricReader.PeriodicExportingMetricReader(OpenTelemetry.BaseExporter<OpenTelemetry.Metrics.Metric!>! exporter, bool useThreads = true, int exportIntervalMilliseconds = 60000, int exportTimeoutMilliseconds = 30000) -> void
1+
OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter<System.Diagnostics.Activity!>! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512, bool useThreads = true) -> void
2+
OpenTelemetry.BatchExportProcessor<T>.BatchExportProcessor(OpenTelemetry.BaseExporter<T!>! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512, bool useThreads = true) -> void
3+
OpenTelemetry.BatchLogRecordExportProcessor.BatchLogRecordExportProcessor(OpenTelemetry.BaseExporter<OpenTelemetry.Logs.LogRecord!>! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512, bool useThreads = true) -> void
4+
OpenTelemetry.Metrics.PeriodicExportingMetricReader.PeriodicExportingMetricReader(OpenTelemetry.BaseExporter<OpenTelemetry.Metrics.Metric!>! exporter, int exportIntervalMilliseconds = 60000, int exportTimeoutMilliseconds = 30000, bool useThreads = true) -> void

src/OpenTelemetry/BatchExportProcessor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected BatchExportProcessor(
4343
int scheduledDelayMilliseconds,
4444
int exporterTimeoutMilliseconds,
4545
int maxExportBatchSize)
46-
: this(exporter, true, maxQueueSize, scheduledDelayMilliseconds, exporterTimeoutMilliseconds, maxExportBatchSize)
46+
: this(exporter, maxQueueSize, scheduledDelayMilliseconds, exporterTimeoutMilliseconds, maxExportBatchSize, true)
4747
{
4848
}
4949

@@ -58,11 +58,11 @@ protected BatchExportProcessor(
5858
/// <param name="maxExportBatchSize">The maximum batch size of every export. It must be smaller or equal to maxQueueSize. The default value is 512.</param>
5959
protected BatchExportProcessor(
6060
BaseExporter<T> exporter,
61-
bool useThreads = true,
6261
int maxQueueSize = DefaultMaxQueueSize,
6362
int scheduledDelayMilliseconds = DefaultScheduledDelayMilliseconds,
6463
int exporterTimeoutMilliseconds = DefaultExporterTimeoutMilliseconds,
65-
int maxExportBatchSize = DefaultMaxExportBatchSize)
64+
int maxExportBatchSize = DefaultMaxExportBatchSize,
65+
bool useThreads = true)
6666
: base(exporter)
6767
{
6868
Guard.ThrowIfOutOfRange(maxQueueSize, min: 1);

src/OpenTelemetry/Logs/Processor/BatchLogRecordExportProcessor.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public BatchLogRecordExportProcessor(
2727
int maxExportBatchSize)
2828
: this(
2929
exporter,
30-
true,
3130
maxQueueSize,
3231
scheduledDelayMilliseconds,
3332
exporterTimeoutMilliseconds,
34-
maxExportBatchSize)
33+
maxExportBatchSize,
34+
true)
3535
{
3636
}
3737

@@ -46,18 +46,18 @@ public BatchLogRecordExportProcessor(
4646
/// <param name="maxExportBatchSize">The maximum batch size of every export. It must be smaller or equal to maxQueueSize. The default value is 512.</param>
4747
public BatchLogRecordExportProcessor(
4848
BaseExporter<LogRecord> exporter,
49-
bool useThreads = true,
5049
int maxQueueSize = DefaultMaxQueueSize,
5150
int scheduledDelayMilliseconds = DefaultScheduledDelayMilliseconds,
5251
int exporterTimeoutMilliseconds = DefaultExporterTimeoutMilliseconds,
53-
int maxExportBatchSize = DefaultMaxExportBatchSize)
52+
int maxExportBatchSize = DefaultMaxExportBatchSize,
53+
bool useThreads = true)
5454
: base(
5555
exporter,
56-
useThreads,
5756
maxQueueSize,
5857
scheduledDelayMilliseconds,
5958
exporterTimeoutMilliseconds,
60-
maxExportBatchSize)
59+
maxExportBatchSize,
60+
useThreads)
6161
{
6262
}
6363

src/OpenTelemetry/Metrics/Reader/PeriodicExportingMetricReader.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public PeriodicExportingMetricReader(
3232
BaseExporter<Metric> exporter,
3333
int exportIntervalMilliseconds,
3434
int exportTimeoutMilliseconds)
35-
: this(exporter, true, exportIntervalMilliseconds, exportTimeoutMilliseconds)
35+
: this(exporter, exportIntervalMilliseconds, exportTimeoutMilliseconds, true)
3636
{
3737
}
3838

@@ -45,9 +45,9 @@ public PeriodicExportingMetricReader(
4545
/// <param name="exportTimeoutMilliseconds">How long the export can run before it is cancelled. The default value is 30000.</param>
4646
public PeriodicExportingMetricReader(
4747
BaseExporter<Metric> exporter,
48-
bool useThreads = true,
4948
int exportIntervalMilliseconds = DefaultExportIntervalMilliseconds,
50-
int exportTimeoutMilliseconds = DefaultExportTimeoutMilliseconds)
49+
int exportTimeoutMilliseconds = DefaultExportTimeoutMilliseconds,
50+
bool useThreads = true)
5151
: base(exporter)
5252
{
5353
Guard.ThrowIfInvalidTimeout(exportIntervalMilliseconds);

src/OpenTelemetry/Trace/Processor/BatchActivityExportProcessor.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,37 @@ public BatchActivityExportProcessor(
2727
int maxExportBatchSize)
2828
: this(
2929
exporter,
30-
true,
3130
maxQueueSize,
3231
scheduledDelayMilliseconds,
3332
exporterTimeoutMilliseconds,
34-
maxExportBatchSize)
33+
maxExportBatchSize,
34+
true)
3535
{
3636
}
3737

3838
/// <summary>
3939
/// Initializes a new instance of the <see cref="BatchActivityExportProcessor"/> class.
4040
/// </summary>
41-
/// <param name="exporter"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, bool, int, int, int, int)" path="/param[@name='exporter']"/></param>
42-
/// <param name="useThreads"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, bool, int, int, int, int)" path="/param[@name='useThread']"/></param>
43-
/// <param name="maxQueueSize"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, bool, int, int, int, int)" path="/param[@name='maxQueueSize']"/></param>
44-
/// <param name="scheduledDelayMilliseconds"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, bool, int, int, int, int)" path="/param[@name='scheduledDelayMilliseconds']"/></param>
45-
/// <param name="exporterTimeoutMilliseconds"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, bool, int, int, int, int)" path="/param[@name='exporterTimeoutMilliseconds']"/></param>
46-
/// <param name="maxExportBatchSize"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, bool, int, int, int, int)" path="/param[@name='maxExportBatchSize']"/></param>
41+
/// <param name="exporter"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, int, int, int, int, bool)" path="/param[@name='exporter']"/></param>
42+
/// <param name="useThreads"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, int, int, int, int, bool)" path="/param[@name='useThread']"/></param>
43+
/// <param name="maxQueueSize"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, int, int, int, int, bool)" path="/param[@name='maxQueueSize']"/></param>
44+
/// <param name="scheduledDelayMilliseconds"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, int, int, int, int, bool)" path="/param[@name='scheduledDelayMilliseconds']"/></param>
45+
/// <param name="exporterTimeoutMilliseconds"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, int, int, int, int, bool)" path="/param[@name='exporterTimeoutMilliseconds']"/></param>
46+
/// <param name="maxExportBatchSize"><inheritdoc cref="BatchExportProcessor{T}.BatchExportProcessor(BaseExporter{T}, int, int, int, int, bool)" path="/param[@name='maxExportBatchSize']"/></param>
4747
public BatchActivityExportProcessor(
4848
BaseExporter<Activity> exporter,
49-
bool useThreads = true,
5049
int maxQueueSize = DefaultMaxQueueSize,
5150
int scheduledDelayMilliseconds = DefaultScheduledDelayMilliseconds,
5251
int exporterTimeoutMilliseconds = DefaultExporterTimeoutMilliseconds,
53-
int maxExportBatchSize = DefaultMaxExportBatchSize)
52+
int maxExportBatchSize = DefaultMaxExportBatchSize,
53+
bool useThreads = true)
5454
: base(
5555
exporter,
56-
useThreads,
5756
maxQueueSize,
5857
scheduledDelayMilliseconds,
5958
exporterTimeoutMilliseconds,
60-
maxExportBatchSize)
59+
maxExportBatchSize,
60+
useThreads)
6161
{
6262
}
6363

src/Shared/PeriodicExportingMetricReaderHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal static PeriodicExportingMetricReader CreatePeriodicExportingMetricReade
2121
var exportTimeout =
2222
options.PeriodicExportingMetricReaderOptions.ExportTimeoutMilliseconds ?? defaultExportTimeoutMilliseconds;
2323

24-
var metricReader = new PeriodicExportingMetricReader(exporter, useThreads, exportInterval, exportTimeout)
24+
var metricReader = new PeriodicExportingMetricReader(exporter, exportInterval, exportTimeout, useThreads)
2525
{
2626
TemporalityPreference = options.TemporalityPreference,
2727
};

0 commit comments

Comments
 (0)