-
Notifications
You must be signed in to change notification settings - Fork 5k
fix(otel): ensure default processors are applied in fbreceiver #42658
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
fix(otel): ensure default processors are applied in fbreceiver #42658
Conversation
e1456a5
to
c1bb6e1
Compare
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely fixes the immediate issue.
Longer term though, I'm not sure if we want to always assume that a Beat Receiver will use the default processors.
Maybe change it so that we look at something in the config passed to NewBeatReceiver, and set a field called "UseDefaultProcessors" accordingly in Info
. Would need to be before
beats/libbeat/cmd/instance/beat.go
Line 443 in 7514fa9
processingFactory := settings.Processing |
What do you think?
Thanks, makes total sense. I'll make the necessary changes. |
aa7be28
to
061af6b
Compare
|
||
// NewBeatReceiver creates a Beat that will be used in the context of an otel receiver | ||
func NewBeatReceiver(settings Settings, receiverConfig map[string]interface{}, consumer consumer.Logs, core zapcore.Core) (*Beat, error) { | ||
func NewBeatReceiver(settings Settings, receiverConfig map[string]interface{}, useDefaultProcessors bool, consumer consumer.Logs, core zapcore.Core) (*Beat, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the option inside receiverConfig is also possible, but it only contains the Beats configuration, so I'd have to remove the key from the map. Being explicit here seems more appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank You.
* fix(otel): ensure default processors are applied in fbreceiver * set default processors in NewBeatReceiver (cherry picked from commit d813311)
* fix(otel): ensure default processors are applied in fbreceiver * set default processors in NewBeatReceiver (cherry picked from commit d813311)
… (#42713) * fix(otel): ensure default processors are applied in fbreceiver * set default processors in NewBeatReceiver (cherry picked from commit d813311) Co-authored-by: Mauri de Souza Meneguzzo <[email protected]>
… (#42712) * fix(otel): ensure default processors are applied in fbreceiver * set default processors in NewBeatReceiver (cherry picked from commit d813311) Co-authored-by: Mauri de Souza Meneguzzo <[email protected]>
Proposed commit message
Currently default processors are only applied under fleet management. Enable default processors for beats when running under OTel receiver mode.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues