-
Notifications
You must be signed in to change notification settings - Fork 209
feat(otel/translate): explicitly configure default processors for Beat receivers #12493
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
feat(otel/translate): explicitly configure default processors for Beat receivers #12493
Conversation
…t receivers Currently the default processors are added to Beat receivers implicitly, when there are no processors explicitly configured in the Beat receiver's configuration. This is now changing, and the default processors are added to the Beat receivers' config explicitly during config translation. This makes it easier to reason about the effective configuration of the Beat receivers.
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
|
@andrzej-stencel to really test this don't we also have to make a change in beats so the default processors aren't included? |
Yes I agree we should remove that code, but I don't consider it a blocker to this PR. This PR makes it so the default processors are specified explicitly, which makes the code in Beats no-op - the processors are not injected there, because they are already explicitly defined. |
8091d1d to
1c4c29b
Compare
💛 Build succeeded, but was flaky
Failed CI Steps
History |
I was just thinking for as a step for the manual testing you have in this PR, not a proposed code change for this PR. The code in the beat receiver will always inject the global processors, so I'm not sure you would ever get documents that didn't have the fields from |
|
Yes, this PR looks correct but you won't know for sure until the change in Beat is made to stop configuring these twice. |
|
We could merge this PR, then remove the processors from Beats, which would come in via a separate beats bump PR. If we know it's going to work via manual testing this is pretty low risk, the document equivalence tests would find that host was missing for example. The other option is to do the beats bump PR and update beats in this PR, only consequence of that is the automated beat bump PRs will fail until this merges. This is probably more disruptive. |
|
Let me merge this and prepare the Beats PR removing injecting processors there. |
What does this PR do?
The default processors are now added to the Beat receivers' config explicitly during config translation.
Why is it important?
Previously, the default processors were added to Beat receivers implicitly, when there were no processors configured in the Beat receiver's configuration. This was unnecessary and potentially confusing, making the rendered configuration not matching the actual behavior. Also see #12334 (comment)
Explicitly mentioning the default processors in the config makes it easier to reason about the effective configuration of the Beat receivers.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added an entry in./changelog/fragmentsusing the changelog tool[ ] I have added an integration test or an E2E testHow to test this PR locally
agent.internal.runtime.default: otelto use the OTel runtime.edot/otel-merged-actual.yamlfile from the diagnostics package. The Beat receiver configs likereceivers::filebeatreceiver/_agent-component/filestream-defaultshould have theprocessorsnode specified in their config with the default processors in it.hostfield (for examplehost.architecture). This shows that theadd_host_metadataprocessor is still included.Related issues