Skip to content

Conversation

@himanshu130700
Copy link

@himanshu130700 himanshu130700 commented Jan 27, 2026

fixes #45016

Description

Fix OpenSearch exporter crash when sending_queue only configures batch

Problem
The OpenSearch exporter crashes with the error num_consumers must be positive when sending_queue is configured with only the batch subsection and omits num_consumers and queue_size.

Solution
Added an Unmarshal() method that applies default values when these fields are not explicitly set:
num_consumers = 10 queue_size = 1000

This follows the same defaulting pattern already used by the Elasticsearch exporter.

Testing
Added test case sending_queue_with_batch in config_test.go
All existing tests pass
Verified with race detection

@himanshu130700 himanshu130700 requested a review from a team as a code owner January 27, 2026 20:05
@github-actions github-actions bot added the first-time contributor PRs made by new contributors label Jan 27, 2026
@github-actions
Copy link
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[exporter/opensearch] sending_queue not using default values

2 participants