Ability to provide SocketFactory for http client

Open
#272 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
networking

Research direction

Start by locating how the Splunk HttpClient is created and used for sending log messages. Review the current HttpClient and socket-factory configuration points, then determine how users could provide their own socket factory without reflection. Done means a caller can select the appropriate network and successfully send logs through the configured client.

Written by the indexing model from the issue text.

Description

Currently there's no way to provide a socket factory for the HttpClient used by Splunk.
In some scenarios - some example when running on a device with multiple networks, some connected to the internet while some without internet it is not possible to specify the correct network to use in order to have internet access.

It would be very nice if users of the library could reconfigure the httpClient to provide their own socket factory.

I've been trying to forcefully (i.e. via reflection) reconfigure the instance of httpClient to another one, but I've had limited success in actually getting the log messages to successfully send so far.

Dominant language
Java
Stars
140
Forks
173
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from splunk/splunk-library-javalogging

All issues in splunk/splunk-library-javalogging

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.