Package
OpenTelemetry.Exporter.OpenTelemetryProtocol
Package Version
| Package Name |
Version |
| OpenTelemetry.Api |
1.15.0 |
| OpenTelemetry |
1.15.0 |
Runtime Version
All
Description
When configuring logging with OpenTelemetry, setting OtlpExporterOptions.ExportProcessorType = ExportProcessorType.Simple is ignored. Instead, the exporter silently uses the batch processor.
This behavior is confusing because it appears that LogRecordExportProcessorOptions.ExportProcessorType overrides OtlpExporterOptions.ExportProcessorType even when the former is not explicitly configured.
Steps to Reproduce
Configure OpenTelemetry logging.
Set: options.ExportProcessorType = ExportProcessorType.Simple; on OtlpExporterOptions.
Run the application and observe the export behavior.
Expected Result
OtlpExporterOptions.ExportProcessorType should be respected unless LogRecordExportProcessorOptions is explicitly set.
Actual Result
The exporter uses batch processing regardless of OtlpExporterOptions.ExportProcessorType being set to Simple.
Additional Context
It appears that LogRecordExportProcessorOptions.ExportProcessorType implicitly overrides OtlpExporterOptions.ExportProcessorType, even when not explicitly configured by the user.
|
public ExportProcessorType ExportProcessorType { get; set; } = ExportProcessorType.Batch; |
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Package
OpenTelemetry.Exporter.OpenTelemetryProtocol
Package Version
Runtime Version
All
Description
When configuring logging with OpenTelemetry, setting
OtlpExporterOptions.ExportProcessorType = ExportProcessorType.Simpleis ignored. Instead, the exporter silently uses the batch processor.This behavior is confusing because it appears that
LogRecordExportProcessorOptions.ExportProcessorTypeoverridesOtlpExporterOptions.ExportProcessorTypeeven when the former is not explicitly configured.Steps to Reproduce
Configure OpenTelemetry logging.
Set:
options.ExportProcessorType = ExportProcessorType.Simple; onOtlpExporterOptions.Run the application and observe the export behavior.
Expected Result
OtlpExporterOptions.ExportProcessorTypeshould be respected unlessLogRecordExportProcessorOptionsis explicitly set.Actual Result
The exporter uses batch processing regardless of
OtlpExporterOptions.ExportProcessorTypebeing set toSimple.Additional Context
It appears that
LogRecordExportProcessorOptions.ExportProcessorTypeimplicitly overridesOtlpExporterOptions.ExportProcessorType, even when not explicitly configured by the user.opentelemetry-dotnet/src/OpenTelemetry/Logs/Processor/LogRecordExportProcessorOptions.cs
Line 32 in 4fb41e8
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.