You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preserves the original agent.features subtree in component feature metadata and copies it into generated Beat receiver configs. Removes the separate global FQDN-only propagation path so feature source metadata is authoritative and future Beat-supported flags propagate without translator changes.
Adds coverage for FQDN, log_input_run_as_filestream, aws_s3_v2, unknown future flags, explicit false values, and missing feature metadata.
Why is it important?
The OTel translator previously propagated only FQDN. Other Beat-supported feature flags were dropped, causing Beat receivers to behave differently from the Agent policy.
My code follows the style guidelines of this project
I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have made corresponding change to the default configuration files
I have added tests that prove my fix is effective or that my feature works
I have added an entry in ./changelog/fragments using the changelog tool
[ ] I have added an integration test or an E2E test
Documentation, default configuration, and new integration coverage are not required; this fixes internal propagation and existing receiver integration coverage exercises these flags.
Disruptive User Impact
None. Configured feature flags now consistently reach OTel Beat receivers.
How to test this PR locally
Run the tests
go test ./pkg/features
go test ./internal/pkg/otel/translate
go vet ./pkg/features ./internal/pkg/otel/translate
Manual test
1. Build and unpack a development Agent package
From the repository root:
mage dev:package
cd build/distributions
tar -xf elastic-agent-9.6.0-SNAPSHOT-linux-x86_64.tar.gz
cd elastic-agent-9.6.0-SNAPSHOT-linux-x86_64
2. Create a test log and elastic-agent.yml
The policy deliberately configures a legacy log input, forces it to run as a Beat receiver, and enables agent.features.log_input_run_as_filestream.
printf'manual feature propagation test line %04d\n' {1..200} > /tmp/elastic-agent-feature-test.log
The standalone policy still declares type: log; seeing input.filestream and Input 'filestream' starting confirms that agent.features.log_input_run_as_filestream.enabled: true reached the generated Beat receiver and was applied. Stop the Agent with Ctrl-C after the assertion succeeds.
The fragment-in-pr check failed because pr-has-fragment is resolving the changelog config for elastic/elastic-agent, while this PR is hosted in belimawr/elastic-agent. The required fragment is already present; rerun after adding the skip-changelog label or run the check with repository ownership/config aligned to the fork.
Remediation
For this fork PR, add the skip-changelog label to bypass the upstream-only validation, then rerun fragment-in-pr.
If the workflow is intended to validate fork PRs, make the changelog repository owner/repo resolution use the event repository (or update config.changelog.yaml for the target repository) and rerun the check.
Investigation details
Root Cause
The only failed job is fragments, at check pr-has-fragment. The PR includes changelog/fragments/1783638976-propagate-all-feature-flags-to-beat-receivers.yaml, but the checked-out config.changelog.yaml declares owner: elastic and repo: elastic-agent. The workflow invokes pr-has-fragment --repo elastic-agent 2, so the tool is configured for the upstream repository rather than the PR repository belimawr/elastic-agent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?
Preserves the original
agent.featuressubtree in component feature metadata and copies it into generated Beat receiver configs. Removes the separate global FQDN-only propagation path so feature source metadata is authoritative and future Beat-supported flags propagate without translator changes.Adds coverage for FQDN,
log_input_run_as_filestream,aws_s3_v2, unknown future flags, explicit false values, and missing feature metadata.Why is it important?
The OTel translator previously propagated only FQDN. Other Beat-supported feature flags were dropped, causing Beat receivers to behave differently from the Agent policy.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files./changelog/fragmentsusing the changelog tool[ ] I have added an integration test or an E2E testDocumentation, default configuration, and new integration coverage are not required; this fixes internal propagation and existing receiver integration coverage exercises these flags.
Disruptive User Impact
None. Configured feature flags now consistently reach OTel Beat receivers.
How to test this PR locally
Run the tests
Manual test
1. Build and unpack a development Agent package
From the repository root:
2. Create a test log and
elastic-agent.ymlThe policy deliberately configures a legacy
loginput, forces it to run as a Beat receiver, and enablesagent.features.log_input_run_as_filestream.elastic-agent.yml
3. Start Elastic Agent in standalone mode
Connection errors for
127.0.0.1:9200are expected when Elasticsearch is not running and do not affect this test.4. Verify that the
loginput started as FilestreamIn another terminal:
The output should contain a Filebeat receiver log similar to:
The standalone policy still declares
type: log; seeinginput.filestreamandInput 'filestream' startingconfirms thatagent.features.log_input_run_as_filestream.enabled: truereached the generated Beat receiver and was applied. Stop the Agent with Ctrl-C after the assertion succeeds.Related issues
agent.features.*flags to Beat receivers elastic/elastic-agent#15437