-
Notifications
You must be signed in to change notification settings - Fork 786
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
[sdk] Add ActivityExportProcessorOptions and clean up MetricReaderOptions #5423
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5423 +/- ##
==========================================
+ Coverage 83.38% 84.61% +1.23%
==========================================
Files 297 282 -15
Lines 12531 12116 -415
==========================================
- Hits 10449 10252 -197
+ Misses 2082 1864 -218
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/// <summary> | ||
/// Options for configuring either a <see cref="SimpleActivityExportProcessor"/> or <see cref="BatchActivityExportProcessor"/>. | ||
/// </summary> | ||
public class ActivityExportProcessorOptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add this now?
Today we have these options essentially exposed directly on OtlpExporterOptions
:
opentelemetry-dotnet/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Lines 137 to 147 in f34fce5
/// <summary> | |
/// Gets or sets the export processor type to be used with the OpenTelemetry Protocol Exporter. The default value is <see cref="ExportProcessorType.Batch"/>. | |
/// </summary> | |
/// <remarks>Note: This only applies when exporting traces.</remarks> | |
public ExportProcessorType ExportProcessorType { get; set; } = ExportProcessorType.Batch; | |
/// <summary> | |
/// Gets or sets the BatchExportProcessor options. Ignored unless ExportProcessorType is Batch. | |
/// </summary> | |
/// <remarks>Note: This only applies when exporting traces.</remarks> | |
public BatchExportProcessorOptions<Activity> BatchExportProcessorOptions { get; set; } |
Originally that made sense when we only had tracing. But now we have logging and metrics which also use OtlpExporterOptions
but need different settings. For metrics we have MetricReaderOptions
. For logging we have LogRecordExportProcessorOptions
.
On #5400 we're adding a new UseOtlpExporter
method. Instead of bringing forward this mess that extension will use ActivityExportProcessorOptions
so it mirrors logging & metrics and hides away these two options which really should have never been exposed.
/cc @alanwest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should mark the old options obsolete.
Just in case anyone is wondering...
|
[Originally part of #5400]
Changes
ActivityExportProcessorOptions
for tracing. This brings tracing in line with logging (LogRecordExportProcessorOptions
) and metrics (MetricReaderOptions
).LogRecordExportProcessorOptions
(already in place) orBatchExportLogRecordProcessorOptions
(already in place)MetricReaderOptions
(already in place) orPeriodicExportingMetricReaderOptions
(added on this pr)ActivityExportProcessorOptions
(added on this pr) orBatchExportActivityProcessorOptions
(already in place)Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes