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

[FEATURE REQ] Make BatchLogRecordExportProcessor configurable as in OTLP Exporter for OpenTelemetry .NET #47309

Open
CommitedSajmon opened this issue Nov 24, 2024 · 1 comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@CommitedSajmon
Copy link

Library name

Azure.Monitor.OpenTelemetry.Exporter

Please describe the feature.

OTLP Exporter for OpenTelemetry .NET gives a way to configure BatchExportProcessorOptions:

appBuilder.Logging.AddOpenTelemetry(options =>
{
    options.AddOtlpExporter((exporterOptions, processorOptions) =>
    {
        processorOptions.BatchExportProcessorOptions.ScheduledDelayMilliseconds = 2000;
        processorOptions.BatchExportProcessorOptions.MaxExportBatchSize = 5000;
    });
});

In the SDK, there is no way to configure it as the default parameters are used:

        public static OpenTelemetryLoggerOptions AddAzureMonitorLogExporter(
            this OpenTelemetryLoggerOptions loggerOptions,
            Action<AzureMonitorExporterOptions> configure = null,
            TokenCredential credential = null)
        {
           // rest of the code  
            return loggerOptions.AddProcessor(new BatchLogRecordExportProcessor(new AzureMonitorLogExporter(options)));
        }

BatchLogRecordExportProcessor makes the below properties configurable, but there is no way to configure it using Azure.Monitor.OpenTelemetry.*

public BatchLogRecordExportProcessor(
    BaseExporter<LogRecord> exporter,
    int maxQueueSize = DefaultMaxQueueSize,
    int scheduledDelayMilliseconds = DefaultScheduledDelayMilliseconds,
    int exporterTimeoutMilliseconds = DefaultExporterTimeoutMilliseconds,
    int maxExportBatchSize = DefaultMaxExportBatchSize)
    : base(
        exporter,
        maxQueueSize,
        scheduledDelayMilliseconds,
        exporterTimeoutMilliseconds,
        maxExportBatchSize)
{
}

If telemetry data goes above the limit here it gets dropped, the client should be able to configure the values to prevent telemetry data loss.

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. labels Nov 24, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rajkumar-rangaraj @TimothyMothra.

@TimothyMothra TimothyMothra changed the title Make BatchLogRecordExportProcessor configurable as in OTLP Exporter for OpenTelemetry .NET [FEATURE REQ] Make BatchLogRecordExportProcessor configurable as in OTLP Exporter for OpenTelemetry .NET Nov 25, 2024
@TimothyMothra TimothyMothra added feature-request This issue requires a new behavior in the product in order be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants