[9.1] (backport #10343) feat: utilise continue_on_err in beatsauthextension #10444
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR improves error handling for Elasticsearch output configurations in the Hybrid Elastic Agent by:
Moving partially configuration translation ownership: Relocates some of the Elasticsearch output translation logic from the beats library (
libbeat/otelbeat/oteltranslate/outputs/elasticsearch
) into the elastic-agent package (internal/pkg/otel/translate/output_elasticsearch.go
). In the future we should do a full transition to elastic-agent repo as this gives elastic-agent full control over the translation.Enabling graceful error handling: Adds
continue_on_error: true
to the beatsauth extension configuration ingetBeatsAuthExtensionConfig()
. This prevents the OpenTelemetry collector from exiting on startup when encountering invalid SSL configurations (e.g., missing certificate files) respective PR.Why is it important?
When an Elasticsearch output has invalid configuration (like a missing SSL certificate), the collector exits with a vague error message that doesn't identify which output caused the failure:
Benefits of this PR:
Screenshot shows the intended behavior: collector continues running and errors are properly surfaced at the exporter level.
Checklist
./changelog/fragments
using the changelog toolDisruptive User Impact
No disruptive user impact expected.
How to test this PR locally
build and install elastic-agent from this branch with the following configuration
Related issues
N/A
This is an automatic backport of pull request #10343 done by [Mergify](https://mergify.com).