Skip to content

[bug] OTLP exporter ignores ExportProcessorType.Simple for logs and defaults to batch #7281

@ysolomchenko

Description

@ysolomchenko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageNew issues which have not been classified or triaged by a community memberpkg:OpenTelemetry.Exporter.OpenTelemetryProtocolIssues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions