feat: exposed factory interface to extend splunk_inputs - #110
Open
dhruvanshus-crest wants to merge 3 commits into
Open
feat: exposed factory interface to extend splunk_inputs#110dhruvanshus-crest wants to merge 3 commits into
dhruvanshus-crest wants to merge 3 commits into
Conversation
dhruvanshus-crest
marked this pull request as ready for review
August 13, 2026 11:31
dmitryax
reviewed
Aug 14, 2026
dmitryax
left a comment
Collaborator
There was a problem hiding this comment.
Let's start with the receiver first. Once it's merged, please follow up with the exporter
dhruvanshus-crest
force-pushed
the
feat/otl-4482
branch
from
August 17, 2026 04:26
3d29c29 to
cbcad9c
Compare
dmitryax
reviewed
Aug 17, 2026
Comment on lines
+83
to
+133
| newBuiltInSubReceiver("script", scriptreceiver.NewFactory(), func(req ReceiverRequest) component.Config { | ||
| return &scriptreceiver.Config{ | ||
| Input: req.Input, | ||
| BaseDir: req.BaseDir, | ||
| Transforms: req.Transforms, | ||
| Props: req.Props, | ||
| } | ||
| }), | ||
| newBuiltInSubReceiver("batch", batchreceiver.NewFactory(), func(req ReceiverRequest) component.Config { | ||
| return batchreceiver.Config{ | ||
| Input: req.Input, | ||
| BaseDir: req.BaseDir, | ||
| Transforms: req.Transforms, | ||
| Props: req.Props, | ||
| } | ||
| }), | ||
| newBuiltInSubReceiver("monitor", monitorreceiver.NewFactory(), func(req ReceiverRequest) component.Config { | ||
| return monitorreceiver.Config{ | ||
| Input: req.Input, | ||
| BaseDir: req.BaseDir, | ||
| Transforms: req.Transforms, | ||
| Props: req.Props, | ||
| } | ||
| }), | ||
| newBuiltInSubReceiver("wineventlog", wineventlogreceiver.NewFactory(), func(req ReceiverRequest) component.Config { | ||
| return wineventlogreceiver.Config{ | ||
| Input: req.Input, | ||
| BaseDir: req.BaseDir, | ||
| Transforms: req.Transforms, | ||
| Props: req.Props, | ||
| } | ||
| }), | ||
| newBuiltInSubReceiver("tcp", tcpreceiver.NewFactory(), func(req ReceiverRequest) component.Config { | ||
| return tcpreceiver.Config{ | ||
| Input: req.Input, | ||
| BaseDir: req.BaseDir, | ||
| Transforms: req.Transforms, | ||
| Props: req.Props, | ||
| } | ||
| }), | ||
| newBuiltInSubReceiver("udp", udpreceiver.NewFactory(), func(req ReceiverRequest) component.Config { | ||
| return udpreceiver.Config{ | ||
| Input: req.Input, | ||
| BaseDir: req.BaseDir, | ||
| Transforms: req.Transforms, | ||
| Props: req.Props, | ||
| } | ||
| }), | ||
| } { | ||
| options.subReceivers[strings.ToLower(f.Scheme())] = f | ||
| } |
Collaborator
There was a problem hiding this comment.
Can we reuse tabuilder.CreateReceiver instead of repeating it here?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Task - OTL-4482
splunk_inputsNewFactory(opts ...Option)to register built-in sub-receivers by default and apply external overrides at construction time.splunk_inputsdynamic receiver creation into the new sub-receiver path.script,batch,monitor,tcp,udp, andwineventlog.scriptsub-receiver.batchreceiver creation path to usebatchreceiver.Config.