Skip to content
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

splunkhec exporter: Allows users to enable exporter batching via config #32545

Closed
splunkericl opened this issue Apr 18, 2024 · 3 comments · Fixed by #32563
Closed

splunkhec exporter: Allows users to enable exporter batching via config #32545

splunkericl opened this issue Apr 18, 2024 · 3 comments · Fixed by #32563
Labels
enhancement New feature or request exporter/splunkhec

Comments

@splunkericl
Copy link
Contributor

Component(s)

exporter/splunkhec

Is your feature request related to a problem? Please describe.

With exporter batching introduced in open-telemetry/opentelemetry-collector#9738, users should be able to leverage this for splunk hec exporter so they can enable batching in the exporter side.

Describe the solution you'd like

Adds exporter batching config in the splunk hec exporter config, if the batching is enabled, add the batching options when creating a new log/metrics instance.

type Config struct {
   // ...
   BatcherConfig exporterbatcher.Config    `mapstructure:"batcher"`
}

func createLogsExporter() {
 var options []exporterhelper.Option

  cfg := config.(*Config)
  if cfg.BatcherConfig.Enabled {
      options = append(options, exporterhelper.WithBatcher())
  }
  
  return exporterhelper.NewLogsExporter(..., options...)
}

Describe alternatives you've considered

N/A. Users can utilitize batcher processor but the functionality introduce an async gap in the pipeline. This is what the exporter batching can eliminate.

Additional context

No response

@splunkericl splunkericl added enhancement New feature or request needs triage New item requiring triage labels Apr 18, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@splunkericl
Copy link
Contributor Author

Happy to take this change and submit a PR

@crobert-1
Copy link
Member

Sounds like a good idea to me. Removing needs triage.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Apr 18, 2024
dmitryax pushed a commit that referenced this issue May 4, 2024
**Description:** 
Add a new feature in splunk hec exporter
- utilitize batching framework
open-telemetry/opentelemetry-collector#9738 in
splunk hec exporter
- adds batcher config in splunk hec exporter config and append it as
exporter option if enabled

**Link to tracking Issue:**
Resolves
#32545

**Testing:**
Added unit test for the config

**Documentation:**
Updated the README file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exporter/splunkhec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants