Skip to content

feat: exposed factory interface to extend splunk_inputs - #110

Open
dhruvanshus-crest wants to merge 3 commits into
splunk:mainfrom
dhruvanshus-crest:feat/otl-4482
Open

feat: exposed factory interface to extend splunk_inputs#110
dhruvanshus-crest wants to merge 3 commits into
splunk:mainfrom
dhruvanshus-crest:feat/otl-4482

Conversation

@dhruvanshus-crest

@dhruvanshus-crest dhruvanshus-crest commented Aug 10, 2026

Copy link
Copy Markdown

Task - OTL-4482
splunk_inputs

  • Updated NewFactory(opts ...Option) to register built-in sub-receivers by default and apply external overrides at construction time.
  • Moved splunk_inputs dynamic receiver creation into the new sub-receiver path.
  • Registered built-ins for script, batch, monitor, tcp, udp, and wineventlog.
  • Preserved empty-kind stanza behavior by routing it to the script sub-receiver.
  • Added tests for custom scheme registration, built-in override behavior, normalized scheme matching, unsupported schemes, disabled stanzas, and request propagation of props/transforms.
  • Fixed the existing batch receiver creation path to use batchreceiver.Config.

@dhruvanshus-crest dhruvanshus-crest changed the title feat: exposed factory interface to extent splunk_inputs feat: exposed factory interface to extend splunk_inputs Aug 10, 2026
@dhruvanshus-crest dhruvanshus-crest changed the title feat: exposed factory interface to extend splunk_inputs feat: exposed factory interface to extend splunk_inputs and splunk_outputs Aug 13, 2026
@dhruvanshus-crest
dhruvanshus-crest marked this pull request as ready for review August 13, 2026 11:31

@dmitryax dmitryax left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's start with the receiver first. Once it's merged, please follow up with the exporter

Comment thread pkg/splunkinputsreceiver/subreceiver.go
@dhruvanshus-crest dhruvanshus-crest changed the title feat: exposed factory interface to extend splunk_inputs and splunk_outputs feat: exposed factory interface to extend splunk_inputs 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
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reuse tabuilder.CreateReceiver instead of repeating it here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants